Skip to main content
Glama

IRCTC Train Search Between Stations

irctc.trains.search
Read-onlyIdempotent

Find trains running between two Indian railway stations. Returns train number, name, departure/arrival time, distance, class availability, and running days for a specific journey date.

Instructions

Search trains running between two Indian railway stations. Returns train number, name, departure/arrival time, distance, class availability (1A/2A/3A/SL/CC/EC), and running days (Mon-Sun).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_station_codeYesOrigin station code (3-5 uppercase letters). Examples: NDLS (New Delhi), CSMT (Mumbai CST), HWH (Howrah Kolkata), MAS (Chennai Central), SBC (Bengaluru).
to_station_codeYesDestination station code (3-5 uppercase letters, same format as from_station_code). Use irctc.station_search to discover codes by name.
date_of_journeyYesJourney date in YYYY-MM-DD format. Must be within the next 120 days from today. Example: 2026-05-15.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds value by listing the specific return fields (e.g., class availability, running days) and clarifying the date range (within 120 days). No contradictions with 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 two sentences long, with the purpose immediately stated and supported by concise detail about returned data. No wasted words; every sentence adds value.

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

Completeness5/5

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

The tool is simple with three required parameters and clear return values listed. The description, combined with the input schema and annotations, provides complete context for an agent to use it correctly. The return fields are explicitly mentioned, so no output schema is needed.

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?

Input schema covers all three parameters with descriptions, but the description adds meaning by providing concrete examples of station codes and date format, and advises using a companion tool for code discovery. This goes beyond the schema's 'Examples' field.

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's purpose: 'Search trains running between two Indian railway stations.' It specifies the verb (search), resource (trains), and context (between stations). It lists returned fields (train number, name, times, class availability, running days), distinguishing it from sibling tools like `irctc.stations.search` which searches for station codes.

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 description provides usage context by mentioning that station codes should be in '3-5 uppercase letters' and recommends using `irctc.station_search` to discover codes. It also gives examples (NDLS, CSMT, etc.) and date format constraints. However, it does not explicitly state when not to use this tool or compare it to alternatives like `irctc.trains.status`. Still, the hints are helpful.

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/whiteknightonhorse/APIbase'

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