Skip to main content
Glama

run_sql

Read-onlyIdempotent

Run a single read-only SQLite SELECT query, capped at 50 rows, when no other tool can answer. Use it to fetch store sales, orders, and customer data; writes are blocked.

Instructions

Executa UMA consulta SQL SELECT (SQLite) somente leitura, até 50 linhas.

Use só quando nenhuma outra ferramenta responder. Escritas são bloqueadas.

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": {
      "query": "<query>"
    },
    "name": "run_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered structurally. The description adds genuinely new behavior: SQLite dialect, single-statement restriction, a hard 50-row cap, and that writes are actively blocked rather than merely discouraged — details an agent needs to shape its query.

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 short sentences, no filler, and the hard constraints (read-only, row cap, dialect) are front-loaded before the fallback guidance. Every clause carries operative 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?

For a one-parameter read-only tool with annotations and an output schema, the description covers the essentials: dialect, statement cardinality, row ceiling, and write blocking. Minor gaps remain around truncation signaling and error behavior when a non-SELECT is attempted, but return-value detail is legitimately delegated to the output schema.

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?

The single `query` parameter has 0% schema description coverage, so the description must compensate, and it partially does by implying SQLite syntax, SELECT-only, and one statement per call. It never states the format concretely (no mention that the parameter takes a raw SQL string, no examples, no note on how the 50-row limit interacts with LIMIT clauses).

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 — executing ONE read-only SELECT query against SQLite with a 50-row cap. It distinguishes itself from siblings collectively via the fallback rule, but never names a concrete alternative, so an agent must infer the ordering itself.

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?

"Use só quando nenhuma outra ferramenta responder" is an explicit when-to-use rule that also functions as an exclusion for every sibling. It stops short of telling the agent which tool to prefer for a given intent or of naming a specific alternative, so it is clear but not maximally actionable.

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