Skip to main content
Glama
MCP SQLite Server

MCP SQLite Server

by obiokoye

Run a read-only SQL query

read_query
Read-only

Run a single SQLite SELECT or WITH query and return up to 100 rows as JSON, using LIMIT, GROUP BY, or aggregates for large tables.

Instructions

Run ONE SQLite SELECT (or WITH ... SELECT) statement and get rows back as JSON. At most 100 rows are returned; use LIMIT, GROUP BY and aggregates for large tables.

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": {
      "sql": "<sql>"
    },
    "name": "read_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesA single SELECT statement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds substantive behavior beyond that: a hard 100-row cap and JSON-shaped output. It does not say what happens if a non-SELECT statement is passed or how errors are surfaced, so it stops short of full disclosure.

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?

Two tight sentences, zero waste, with the row-limit constraint front-loaded right after the purpose. Nothing could be removed without losing information.

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

Completeness4/5

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

With no output schema, the description correctly supplies the return shape (rows as JSON) and the row cap. It is close to complete for a one-param read tool, though a note on error/non-SELECT handling would close the remaining gap.

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

Parameters4/5

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

Schema coverage is 100% and the single param is documented, so the baseline would be 3. The description earns more by clarifying that exactly one statement is allowed and that WITH...SELECT is acceptable, which meaningfully constrains what the agent may put in the sql field.

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

Purpose5/5

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

States a specific verb and resource ('Run ONE SQLite SELECT ... statement') plus the return format ('rows back as JSON'). The scope restriction to a single SELECT/WITH...SELECT statement clearly separates it from sibling metadata tools like describe_table and list_tables.

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

Usage Guidelines3/5

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

Offers construction advice for large tables ('use LIMIT, GROUP BY and aggregates'), which implies how to stay under the cap, but gives no explicit when-to-use versus describe_table/list_tables guidance or prerequisites such as knowing the schema first.

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

Deploy Server

Other Tools