executeSql
Run SQL statements on a selected database connection with explicit desktop approval before execution; returns bounded results (default 100 rows, max 1,000).
Instructions
Execute SQL after explicit approval in the desktop. Runs on the active connection unless connectionId suggests another one; the user can change the connection when approving, and the result's connectionId is the one actually used. Defaults to 100 rows, at most 1000. Results are also byte-limited. May modify data or schema.
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": {
"sql": "<sql>"
},
"name": "executeSql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No | ||
| connectionId | No | Suggested connection id from listConnections. Omit to use the active connection; the user may pick another one when approving. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| elapsedMs | Yes | ||
| truncated | Yes | ||
| connectionId | Yes | ||
| rowsAffected | No | ||
| rowsMoreAvailable | Yes |