MCP Tools Reference: spanner.googleapis.com Stay organized with collections Save and categorize content based on your preferences.
Tool:create_session
Create a session in a given database for query executions using execute_sql tool. * Session can be reused to execute multiple concurrent operations.
The following sample demonstrate how to usecurl to invoke thecreate_session MCP tool.
| Curl Request |
|---|
curl--location'https://spanner.googleapis.com/mcp'\--header'content-type: application/json'\--header'accept: application/json, text/event-stream'\--data'{ "method": "tools/call", "params": { "name": "create_session", "arguments": { // provide these details according to the tool'sMCPspecification}},"jsonrpc":"2.0","id":1}' |
Input Schema
The request forCreateSession.
CreateSessionRequest
| JSON representation |
|---|
{"database":string} |
| Fields | |
|---|---|
database |
Required. The database in which the new session is created. Format: |
Output Schema
A session for Spanner API.
Session
| JSON representation |
|---|
{"name":string} |
| Fields | |
|---|---|
name |
Output only. The resource name of the session. Format: |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-11 UTC.