execute_sql
Run one SQL statement against a configured database connection and return result rows, with read-only connections limited to SELECT/SHOW/DESCRIBE/EXPLAIN/WITH and row caps applied.
Instructions
Execute a single SQL statement and return the result rows. In read-only connections only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH statements are allowed. Multi-statement SQL is rejected. Results are capped at the configured max rows.
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": "execute_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL statement to execute. One statement only. | |
| maxRows | No | Override the configured max rows for this call. | |
| connection | No | Connection name. Omit when only one is configured. |