close_cursor
Close an open database cursor to immediately release its connection and slot, ensuring you free resources when you stop reading before the result set is exhausted.
Instructions
Close an open cursor and release its database connection. Idempotent.
Call it when you stop reading a cursor before fetch_rows reports exhausted: a
drained or failed cursor closes itself, and an idle one is reaped after 15
minutes, but an open one holds a connection and one of the 5 cursor slots until
then. It never stops a running statement — use cancel_query for that.
Returns meta, cursor_id, closed and was_open (false when the cursor was
already closed or never existed).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cursor_id": "<cursor_id>"
},
"name": "close_cursor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor_id | Yes | The cursor_id returned by open_query_cursor. An unknown or already-closed id is fine: the call just reports was_open=false. |