db_query
Execute read-only SQL SELECT queries on databases to retrieve data with safety limits, supporting SQLite, PostgreSQL, and MySQL connections.
Instructions
Execute read-only SELECT query. Limited to 100 rows by default for safety.
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": {
"type": "<type>",
"query": "<query>"
},
"name": "db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Database type | |
| query | Yes | SQL SELECT query | |
| connection | No | Connection string | |
| host | No | Database host | |
| port | No | Port number | |
| database | No | Database name | |
| user | No | Username | |
| password | No | Password | |
| limit | No | Max rows (default 100) |