mysql_query
Runs a single read-only SQL statement against a bound MySQL database. Supports SELECT, SHOW, DESCRIBE, and EXPLAIN queries with configurable row limits.
Instructions
Run one read-only SQL statement against the bound database.
Allowed: SELECT (including WITH…SELECT), SHOW, DESCRIBE/DESC, EXPLAIN.
Results are capped (default 100 rows, max 1000); truncation is explicit.
Args:
sql: A single read-only SQL statement
limit: Max rows to return (default 100, max 1000)
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": "mysql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |