Skip to main content
Glama
Read-only SQLite MCP

Read-only SQLite MCP

read_query

Execute capped read-only SQL queries (SELECT/WITH/PRAGMA/EXPLAIN) on allow-listed SQLite databases to inspect schemas and data without writes.

Instructions

Run a read-only SQL query (SELECT / WITH / PRAGMA / EXPLAIN only). Results are capped.

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": "read_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo
databaseYesDatabase alias or path given at server startup

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full transparency burden; it usefully discloses read-only execution, allowed statement types, and that results are capped. It does not specify the cap, what happens on write attempts, permissions/auth requirements, or error behavior, leaving material gaps.

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

Conciseness5/5

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

One front-loaded sentence plus a short parenthetical, with no filler. The allowed-statement and cap details each earn their place.

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

Completeness2/5

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

For a 3-parameter query tool with no annotations and no output schema, the definition is too sparse. It covers the core safety constraint but omits parameter explanations, result format, cap behavior, and execution prerequisites, so an agent lacks enough context to call it confidently.

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

Parameters2/5

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

Schema coverage is low (33%): only database is described in schema, while sql and limit are bare. The parenthetical adds useful meaning for sql by restricting statement types, and 'Results are capped' hints at limit, but the description does not explain database aliases/paths, limit default/max, or how limit interacts with the cap.

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?

States a specific verb and resource ('Run a read-only SQL query') and narrows it to SELECT/WITH/PRAGMA/EXPLAIN, so an agent can identify the operation. It does not explicitly contrast with sibling tools like sample_rows or export_csv, so it misses the top evidence for a 5.

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?

The description provides allowed SQL statement types but no when-to-use or when-not-to-use guidance relative to list_tables, describe_table, sample_rows, or export_csv. An agent must infer that this is the arbitrary-query entry point.

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