Skip to main content
Glama

SQLite query

sqlite_query
Read-onlyIdempotent

Run 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

NameRequiredDescriptionDefault
sqlYesA single read-only SELECT statement. Inspect the schema with "SELECT name, sql FROM sqlite_master" or "PRAGMA table_info('t')".
paramsNoValues for ? placeholders in the query.
databaseYesSQLite database file in the workspace.
max_rowsNo

Output Schema

NameRequiredDescriptionDefault
rowsYes
columnsYes
databaseYes
row_countYesNumber of rows returned.
truncatedYesTrue if the query produced more than max_rows rows.
elapsed_msYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the description's 'read-only' restates structured data. It does add the workspace-scope constraint, but omits behavior the annotations don't cover: the default 200-row cap / 5000 maximum, single-statement enforcement, and what happens on a write attempt or SQL error.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; scope (workspace) and constraint (read-only) come first. It is arguably too terse for a tool with four parameters, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and annotations cover the safety profile. However, for a query tool with a row cap and placeholder binding, the definition never mentions truncation behavior or parameter binding, leaving gaps the schema only partly fills.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75% and the sql parameter already carries a strong description with schema-inspection examples, so the schema does the heavy lifting. The description adds no meaning beyond it and says nothing about params, database, or the max_rows cap that lacks a schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (run) and resource (read-only SQL query against a SQLite database) plus the workspace scope, so the operation is unambiguous. It does not explicitly differentiate itself from siblings such as query_records, but the SQLite/SQL framing is distinctive enough to route an agent correctly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to choose this over query_records or other data-access siblings, and no stated preconditions (e.g., must the database file already exist?). The 'read-only' phrasing implies a constraint but not an alternative-selection rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.