Skip to main content
Glama

next_trains

Check upcoming Caltrain departures between specified stations. Provide origin and destination station names to retrieve real-time schedule details. Use list_stations() for exact station names if needed.

Instructions

Return the next few scheduled Caltrain departures.

Args: origin: Station name (e.g. 'San Jose Diridon', 'Palo Alto', 'San Francisco'). Supports common abbreviations like 'SF' for San Francisco, 'SJ' for San Jose. If station is not found, use list_stations() to see all available options. destination: Station name (e.g. 'San Francisco', 'Mountain View', 'Tamien'). Supports common abbreviations like 'SF' for San Francisco, 'SJ' for San Jose. If station is not found, use list_stations() to see all available options. when_iso: Optional ISO-8601 datetime (local time). Default: now.

Note: If you get a "Station not found" error, try using the list_stations() tool first to see exact station names, then retry with the correct spelling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destinationYes
originYes
when_isoNo
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's function and error handling behavior well, but doesn't mention important behavioral aspects like rate limits, authentication requirements, response format, or how many departures 'the next few' represents. It provides basic operational context but lacks comprehensive behavioral transparency.

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?

The description is well-structured with a clear purpose statement followed by parameter documentation and a helpful note. While slightly repetitive (the list_stations guidance appears twice), every sentence adds value. The front-loaded purpose statement immediately communicates the tool's function, making it efficient for agent comprehension.

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?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description provides good coverage of inputs, usage, and error handling. The main gap is the lack of output format description - while the purpose mentions 'departures', it doesn't specify what data fields are returned. However, the parameter documentation and usage guidance are comprehensive enough for effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing rich semantic information for all 3 parameters. It explains what each parameter represents (origin/destination stations, optional datetime), provides concrete examples ('San Jose Diridon', 'Palo Alto'), documents abbreviation support ('SF' for San Francisco), and specifies default behavior (when_iso defaults to now). This goes well beyond what the bare schema provides.

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 specific action ('Return the next few scheduled Caltrain departures') and resource (Caltrain departures). It distinguishes from the sibling tool list_stations by focusing on departure schedules rather than station listings, providing a complete and unambiguous purpose statement.

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?

The description provides explicit guidance on when to use this tool (for departure schedules) and when to use the alternative (list_stations for station names). It includes specific error handling advice: 'If station is not found, use list_stations() to see all available options' and repeats this guidance in the note section, creating clear decision rules for the agent.

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

Related 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/davidyen1124/caltrain-mcp'

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