run_select_query
Executes read-only SELECT queries with parameterized inputs, optimizer hints, caching, and dry-run plans, supporting JOINs, subqueries, and aggregations for safe data retrieval.
Instructions
⚡ PRIMARY TOOL FOR SELECT QUERIES. Executes read-only SELECT statements with parameterization, optimizer hints, query caching, and dry-run mode. Supports complex queries with JOINs, subqueries, and aggregations. ⚠️ ONLY for SELECT - use execute_write_query for INSERT/UPDATE, use execute_ddl for CREATE/ALTER/DROP.
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": {
"query": "<query>"
},
"name": "run_select_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hints | No | Optional MySQL optimizer hints to apply to the query | |
| query | Yes | SQL SELECT query to execute | |
| params | No | Optional array of parameters for parameterized queries | |
| dry_run | No | If true, returns query plan and estimated cost without executing (Safe Mode) | |
| useCache | No | Whether to use query result caching when the cache is enabled with CACHE_ENABLED=true (default: true) |