run_query
Execute one read-only SQL statement against a MySQL database and return columns and rows, with parameter binding and a 200-row cap that flags truncated results.
Instructions
Runs one read-only statement (SELECT, WITH, TABLE, VALUES, SHOW, DESCRIBE or EXPLAIN) and returns columns and rows, at most 200 rows with truncated=true if there were more. Use ? placeholders with params for values. Refused statements return refused=true with a reason and a suggestion.
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": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SQL statement. | |
| params | No | Values for ? placeholders, in order. Bound by the server, never spliced into the SQL. SELECT, TABLE and VALUES only. | |
| database | No | Default database for unqualified table names. Omit if every name is qualified as db.table. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |