query
Execute SQL against SQLite with parameter binding, choosing table, vertical, or JSON output. Includes safety limits via opcode watchdog and cell truncation.
Instructions
Execute a SQL query against a SQLite database with parameter binding and token-efficient formatting. Returns results as Markdown table, vertical record view, or JSON. Protected by opcode execution watchdog and cell truncation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | Optional path to SQLite database file. Defaults to configured default database. | |
| sql | Yes | The SQL query to execute in SQLite engine. | |
| format | No | Output format: 'table' (compact Markdown), 'vertical' (wide records), or 'json'. | table |
| params | No | Optional query parameters (positional list, named dict, or JSON string). | |
| readonly | No | Enforce read-only mode via PRAGMA query_only and AST authorizer. | |
| cell_max_chars | No | Maximum characters per cell before truncation (default: 200, 0 = unlimited). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |