Skip to main content
Glama
LiteDB desktop

LiteDB desktop

Run SQL

query
Read-only

Run SQL against a LiteDB database: reads return rows; writes are classified with affected-row counts, an execution plan, and a single-use approval token instead of executing.

Instructions

Run SQL against the database. A read executes and returns rows. Anything that would change the database does NOT execute: it comes back classified, with the number of rows it would affect and the query plan, plus a single-use token for execute_approved. A statement the policy forbids is refused and says why.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesOne or more SQL statements, separated by semicolons.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The annotations declare readOnlyHint=true and openWorldHint=false; the description is fully consistent with that and goes well beyond it. It discloses what happens to mutations (not executed, classified, row count and query plan returned, single-use token issued), what happens to forbidden statements (refused with a reason), and that reads return rows. This is precisely the context annotations cannot carry.

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?

Four short sentences, front-loaded with the core read-versus-write distinction, then the mutation outcome, then policy refusal. Every clause conveys a distinct behavior; nothing is redundant with the title or schema.

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

Completeness5/5

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

There is no output schema, so the description must explain returns, and it does: rows for reads, and a classification plus affected-row count, query plan, and token for non-executed mutations. For a one-parameter tool with read-only annotations, nothing an agent needs to call it correctly is missing.

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 description coverage is 100% and the single sql parameter is already documented as accepting semicolon-separated statements. The description adds no meaning about statement syntax, limits, or formatting beyond what the schema states, so the baseline of 3 applies.

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?

"Run SQL against the database" states a specific verb and resource, and the description immediately splits the outcome into reads that execute and mutations that do not. That split is exactly what separates it from execute_approved, which is named directly, so an agent can choose between the two without opening either schema.

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

Usage Guidelines4/5

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

The usage rule is conveyed through behavior rather than an imperative: reads belong here, writes come back with a token destined for execute_approved, and policy-forbidden statements are refused. The routing is unambiguous, but it is inferred from outcome descriptions rather than stated as "use this when / not when", and other siblings such as describe_table or list_tables are not addressed.

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