db_query
Execute SELECT queries on databases with automatic LIMIT 1000 for safety. Use this tool to retrieve data from PostgreSQL, MySQL, or SQLite connections.
Instructions
Execute a SELECT query. Auto-adds LIMIT 1000 if no LIMIT clause present.
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": {
"connection_id": "<connection_id>",
"sql": "<sql>"
},
"name": "db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |