run_query
Execute read-only SQL queries on MySQL, MariaDB, SQLite, or MSSQL databases. Accepts SELECT, EXPLAIN, SHOW, and PRAGMA statements while rejecting writes.
Instructions
Run a read-only SQL query (SELECT, EXPLAIN, SHOW, PRAGMA). Write statements are rejected.
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": {
"connectionId": "<connectionId>",
"sql": "<sql>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to run | |
| connectionId | Yes | Connection ID from list_connections | |
| project_root | No | Absolute path to the current project directory (same value passed to list_connections) |