Execute a SQL query
execute_raw_queryRun SQL against PostgreSQL with automatic permission detection and approval prompts for writes or dangerous DDL; optionally validate queries with dry-run before execution.
Instructions
Execute a SQL query. The system will automatically detect the required permission level and request user approval for write operations and dangerous DDL commands.
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_raw_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL statement to run. | |
| dry_run | No | If true, validates the query without executing it |