Skip to main content
Glama

run_query

Read-only

Run one read-only SQL statement (SELECT, WITH, VALUES, or EXPLAIN) against the SQLite analytics database of one named RevScope project. Call list_projects for the names and get_schema to learn the tables. Paginate with the limit and offset arguments rather than a LIMIT or OFFSET clause, and always ORDER BY so pages are stable. Blob values are returned base64 encoded.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesA single read-only SQL statement.
limitNoRows to return, at most 500. Defaults to 100.
offsetNoRows to skip, at most 5000. Defaults to 0.
project_nameYesWhich project to query, spelled exactly as list_projects returns it. Required: there is no default project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Consistent with readOnlyHint=true, and it adds behavior beyond the annotations: only a single statement is accepted, result pages are only stable with an ORDER BY, and blob values come back base64 encoded. It stops short of covering failure modes such as SQL errors, timeouts, or what happens if a write statement is submitted, so it is strong but not exhaustive.

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?

Five short sentences, each carrying distinct information, with the operation and its read-only constraint front-loaded before discovery, pagination, and encoding notes. No filler or repetition of schema details.

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?

No output schema exists, so the description carries the return-value burden; it covers blob encoding and page stability but not the overall result shape (column names, row container, error payload). For a single-statement query tool with full schema coverage this is nearly complete, with a minor gap on response structure.

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 already 100%, so a 3 would be the floor, and the description adds real meaning on top: limit/offset must be used instead of SQL clauses, pages need ORDER BY, and project_name must be spelled exactly as list_projects returns it. It does not restate the 500/5000 caps or defaults, which the schema already carries.

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?

Names a specific verb and resource (run one read-only SQL statement) and narrows the accepted statement types to SELECT, WITH, VALUES, or EXPLAIN against a named project's SQLite analytics database. This is clearly distinguishable from the siblings list_projects and get_schema, which are referenced as separate discovery steps.

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

Usage Guidelines5/5

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

Explicitly routes the agent to list_projects for project names and get_schema for tables, and gives a concrete usage rule: paginate via limit/offset instead of a SQL LIMIT/OFFSET clause, and always ORDER BY for stable pages. The alternatives and their triggering conditions are stated, not inferred.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.