Skip to main content
Glama

Run a SQL query

query
Read-onlyIdempotent

Run one read-only SQL SELECT (SQLite) over the views races, editions and sources. Returns columns and rows; truncated is true when more rows exist than limit (max 500). Example: SELECT slug, name, date, city FROM races WHERE state='CO' AND distance_category='100M' AND date >= date('now') ORDER BY date

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real substance on top: exactly one statement per call, only the three whitelisted views are queryable, and `truncated` signals that more rows exist than `limit`. The result shape (columns + rows) is disclosed even though no output schema 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?

The hard constraint (one read-only SELECT) and the queryable views land in the first sentence; the truncation caveat and a concrete example follow. Nothing is padded — the example earns its space for a free-form SQL tool.

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 two-parameter tool with no output schema, the description covers dialect, scope, view whitelist, result shape, and truncation semantics. It stops short of saying what happens on invalid SQL or whether non-whitelisted objects error out, which an agent would still want to know.

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?

With 0% schema description coverage the description must carry both parameters, and it does for `sql` (SQLite dialect, read-only single SELECT, view names, plus a working example) and for `limit` (max 500, drives `truncated`). The default of 100 is left to the schema, a minor omission.

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 read-only SQL SELECT over the named views `races`, `editions`, `sources`. Naming the exact view whitelist and dialect (SQLite) makes it unambiguously distinct from `search_races` or `get_race`, which are structured lookups.

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?

Clear context is set — single statement, read-only, limited to three views, rows capped at 500 — which implicitly bounds when this is appropriate. It never explicitly says when to prefer `search_races` or `describe` over hand-written SQL, so the agent must infer that split from the sibling names.

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.

Resources