Query SQLite database
sqlite_queryRun one read-only SQL statement against a SQLite file to inspect data safely, returning JSON rows with row limits and blocking writes or ATTACH.
Instructions
Run one read-only SQL statement on a SQLite file (sqlite3 -readonly -safe -json; ATTACH and other escapes are disabled). Must start with SELECT, WITH, VALUES, or EXPLAIN [QUERY PLAN] followed by one of those. Runs wrapped as SELECT * FROM () LIMIT <limit+1>; truncated=true means more rows exist. ";" is allowed only inside string literals, quoted identifiers and comments, plus one trailing. Bind parameters (?, :x, @x, $x, #x) are rejected — write values as literals. EXPLAIN describes the wrapped statement. BLOBs are not converted — use hex(col) or length(col). A database with a -wal journal is read from a temporary copy (wal_copy in the response).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| path | Yes | ||
| limit | No | Default 100, max 1000. | |
| timeout_ms | No | Default 5000, max 30000. |