db_execute_query
Execute read-only SQL queries like SELECT, SHOW, DESCRIBE, EXPLAIN to retrieve data from PostgreSQL or MySQL, returning columns, rows, and execution metadata.
Instructions
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN). Returns columns, rows, and execution metadata.
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": "db_execute_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to execute. Only SELECT, SHOW, DESCRIBE, and EXPLAIN queries are allowed. | |
| limit | No | Maximum number of rows to return (default: 1000, max: 10000) | |
| timeout | No | Query timeout in milliseconds (default: 30000, max: 300000) |