Skip to main content
Glama
qa-triage-mcp
by mnawaz6935

Run read-only SQL

run_readonly_query
Read-only

Execute a single read-only SELECT against the QA results database when no other tool fits, rejecting writes and multiple statements.

Instructions

Run ONE read-only SELECT against the results DB when no other tool fits. Writes, PRAGMA, ATTACH and multiple statements are rejected. Read qa://schema first.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesA single SELECT/WITH statement
max_rowsNo

Output Schema

NameRequiredDescriptionDefault
rowsYes
row_countYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the description doesn't need to argue safety; instead it adds enforcement detail the annotations don't carry — statement-type rejection rules and the single-statement constraint. It omits the row-cap/truncation behavior even though max_rows exists.

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 sentences, zero filler, with the core constraint and the fallback rule front-loaded before the rejection list and the schema prerequisite.

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?

An output schema exists, so return values need not be explained, and the description covers the two things an agent would otherwise get wrong: using this as a last resort and the read-only grammar restrictions. The only real gap is unstated max_rows/truncation semantics.

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 coverage is 50%: the sql parameter is documented in the schema itself, while max_rows has only type/bounds/default and no prose. The description reinforces the single-statement constraint on sql but says nothing about max_rows or what happens at the 200-row maximum, so it only marginally compensates.

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 (run), resource (ONE read-only SELECT against the results DB) and an explicit positional stance ('when no other tool fits'), which separates it from the purpose-built siblings like cluster_failures or test_history.

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?

Gives a clear selection rule ('when no other tool fits'), explicit exclusions (writes, PRAGMA, ATTACH, multiple statements are rejected) and a prerequisite ('read qa://schema first'). It stops short of naming concrete alternative tools, so routing still requires the agent to infer from sibling names.

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