read_query
Execute read-only SQL queries on PostgreSQL with enforced row limits to safely retrieve data while preventing resource overuse.
Instructions
Execute a safe read-only SQL query (SELECT, WITH, SHOW) with strict LIMIT enforcement and formatting
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": "read_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SQL query to execute | |
| limit | No | Maximum number of rows to return (default: 100, max: 1000) |