SQLite query
sqlite_queryRun read-only SQL queries against a workspace SQLite database to inspect schemas and retrieve data safely, with optional parameters and row limits.
Instructions
Run a read-only SQL query against a SQLite database in the workspace.
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": {
"database": "<database>",
"sql": "<sql>"
},
"name": "sqlite_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SELECT statement. Inspect the schema with "SELECT name, sql FROM sqlite_master" or "PRAGMA table_info('t')". | |
| params | No | Values for ? placeholders in the query. | |
| database | Yes | SQLite database file in the workspace. | |
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| database | Yes | ||
| row_count | Yes | Number of rows returned. | |
| truncated | Yes | True if the query produced more than max_rows rows. | |
| elapsed_ms | Yes |