Skip to main content
Glama

stl_gtfs_query

Read-onlyIdempotent

Execute read-only SQL queries on GTFS transit data to retrieve schedules, routes, and stops. Returns results with enforced limits.

Instructions

Run one read-only SQL query against the imported GTFS feed.

Tables are the GTFS filenames without .txt: agency, stops, routes, trips, stop_times, calendar, calendar_dates, shapes, feed_info. All columns are TEXT, including numeric-looking ids -- leading zeros are meaningful in GTFS.

Writes, ATTACH and PRAGMA are denied at the database driver; a wall-clock timeout and row/byte caps are enforced. Only a single statement is accepted.

This is the general-purpose escape hatch: anything the named tools do not cover can be expressed here.

Args: sql: a single SELECT or WITH statement. limit: max rows (hard cap 1000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo
snapshotNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

The description reinforces the read-only annotation and adds concrete denied operations and limits, making the tool's behavior highly transparent. There is no contradiction with the annotations.

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 description is compact and information-dense, covering purpose, constraints, data model, and fallback role without unnecessary elaboration. Each sentence adds value.

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?

The description is largely complete for a general-purpose query tool, including constraints and the escape-hatch role. It does not explain the snapshot parameter or output format, but these are less critical given the SQL-query nature and the provided schema.

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?

The sql and limit parameters are well explained, including the required SELECT/WITH form and the hard cap. However, the snapshot parameter is not described, leaving its purpose and format unclear.

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?

The description clearly states the tool runs one read-only SQL query against the GTFS feed and explicitly identifies itself as the general-purpose escape hatch. This distinguishes it from the many specialized sibling tools by indicating it covers anything they do not.

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?

It explicitly tells when to use this tool: for anything the named tools do not cover. It also provides critical usage constraints, such as only one statement, no writes, no ATTACH/PRAGMA, and row/byte caps.

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