Skip to main content
Glama

query

Run a read-only SQLite SELECT to retrieve rows from hospital tables, with results capped at 1,000 rows and a truncated flag. Aggregate in SQL to avoid pulling large raw datasets.

Instructions

Run one read-only SQLite SELECT (or WITH ... SELECT) and get the rows back.

Aggregate in SQL instead of pulling raw rows: the stays table has 151,000 rows. At most 1,000 rows are returned; truncated says whether more existed. Dates are text in YYYY-MM-DD form, so strftime('%Y-%m', date) and date BETWEEN '2025-11-01' AND '2026-10-31' work.

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
sqlYes
limitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does well on the important traits: read-only, single statement, 1,000-row return cap, and the `truncated` flag that signals more rows existed. It says nothing about error behavior, timeouts, or whether non-SELECT statements are rejected and how, which leaves real gaps for a mutation-capable-looking SQL tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences with the core action front-loaded and zero filler. The aggregate-first advice and the date-format tip each earn their place by preventing a concrete failure mode. Slightly choppy line breaks but no wasted content.

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

Completeness3/5

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

For a tool with no annotations and no output schema, the description covers the essentials an agent needs to call it correctly: statement type, row cap, truncation signal, and date typing. It omits what tables and columns exist (reasonably delegated to describe_table and list_tables) but also omits the `limit` parameter's behavior, leaving a real hole.

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 0% across 2 parameters, so the description must compensate. It adds useful SQL dialect semantics — date text format, strftime('%Y-%m', date), and BETWEEN range filtering — but never explains the `limit` parameter (default 200) or its relationship to the 1,000-row hard cap, leaving one parameter entirely undefined.

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: 'Run one read-only SQLite SELECT (or WITH ... SELECT) and get the rows back.' That tells an agent exactly what this does and the read-only constraint. It does not explicitly distinguish itself from siblings like describe_table or list_tables, so it falls short of a 5.

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 clear operational guidance — 'Aggregate in SQL instead of pulling raw rows' — motivated by the 151,000-row stays table, which steers the agent toward the right query shape. It stops short of naming alternatives, so it never says when to reach for describe_table or overview instead of querying directly.

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