execute_sql
Run read-only SQL queries like SELECT, EXPLAIN, or SHOW on PostgreSQL databases. Write operations are blocked and queries timeout after 30 seconds.
Instructions
Execute a read-only SQL query (SELECT, EXPLAIN, SHOW, WITH). Write operations are blocked. Max execution time: 30 seconds.
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": "execute_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SQL query | |
| database | No | Database alias to query. Omit to use the primary database. |