db_query
Run read-only SELECT, SHOW, EXPLAIN, or WITH statements against a configured database connection and return the resulting rows.
Instructions
Run a read-only SQL statement (SELECT/SHOW/EXPLAIN/read-only WITH) and return 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": {
"connection_id": "<connection_id>",
"sql": "<sql>"
},
"name": "db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No | ||
| params | No | ||
| connection_id | Yes |