datadatabase query

Database Query

database_query

Runs a bounded, read-only SELECT or EXPLAIN SELECT query against a local SQLite database. It rejects write statements, multiple statements, PRAGMA, ATTACH, and transaction commands; connections are query-only. Use when: inspecting data after database_inspect has identified the relevant schema. Scope: local SQLite files only. Read-only; returns at most 500 rows and stops long-running queries. Not for: schema changes, inserts, updates, deletes, remote databases, or arbitrary SQL scripts.

How to use database_query

Provide only the required inputs below. Start with the smallest scope that answers the task, then review the risk properties before an agent executes the call.

Risk and execution properties

Read only: yes

Destructive: no

Idempotent: yes

Open world: no — operates locally or through configured services

Inputs

pathstringrequired

Path to a local SQLite database file.

querystringrequired

One SELECT statement or EXPLAIN SELECT statement. Do not include a trailing semicolon.

parametersarray

Optional positional values for ? placeholders.

max_rowsinteger

Maximum rows returned. Default: 100. Max: 500.

Default: 100

Example input

{
  "path": "<string>",
  "query": "<string>",
  "parameters": "<array>",
  "max_rows": 100
}

Browse or search the full 74-tool reference to choose the smallest suitable capability.

Browse all tools →