Skip to main content
Glama
MananshuMandaliya

PTV Transit MCP Server

run_sql_query

Run read-only SQL SELECT queries on GTFS data (routes, stops, trips, stop_times, calendar) to answer custom questions beyond standard tools.

Instructions

Run a read-only SQL SELECT query against the GTFS database directly, for questions the other tools don't cover.

Only SELECT statements are permitted. Available tables: routes, stops, trips, stop_times, calendar (each has a gtfs_mode column identifying the transport mode). Use the ptv://schema resource to see column details.

Args: query: A single SQL SELECT statement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the read-only nature, the SELECT-only constraint, available tables, and points to ptv://schema for column details. This covers key behavioral traits, though it omits details about limits or error handling, which are less critical given the output schema.

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 well-structured: a clear one-line purpose, followed by constraints and an args section. Every sentence adds value without redundancy.

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 provides essential context: available tables, the schema resource for columns, and the intended scope (other tools don't cover). Since an output schema exists, return values are documented elsewhere. Minor gaps like query limits or examples prevent a perfect score.

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 0%, so the description compensates by explaining that the query parameter must be a single SQL SELECT statement. This adds essential meaning beyond the property name, though it could benefit from syntax examples or clarifications.

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 it runs a read-only SQL SELECT query against the GTFS database, distinguishing itself as a direct query tool for questions other tools don't cover. This is a specific verb+resource with explicit differentiation from siblings.

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?

The phrase 'for questions the other tools don't cover' provides clear context for when to use this tool, and the constraint that only SELECT statements are permitted implies a read-only use case. However, it does not explicitly name alternatives or list when-not-to-use conditions beyond the general other-tools note.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MananshuMandaliya/ptv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server