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 use curl to invoke the create_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's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
The request for CreateSession.
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: ❌