db_query
Execute read-only SQL queries against the app-under-test database to inspect its data; returns columns, rows, and total row count (capped at 200).
Instructions
Executes a read-only query (SELECT/WITH/EXPLAIN/PRAGMA) against the app-under-test database. Pass the connection in db (SQLite path or "file:" / postgres:// URL); otherwise the engine-side YATT_APP_DB/--app-db configuration applies. Returns {columns, rows, totalRows}; rows are capped at 200.
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": "db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | Connection: SQLite path or "file:" / postgres:// URL (overrides the global configuration) | |
| sql | Yes | Read-only SQL query (SELECT, WITH, EXPLAIN or PRAGMA) |