Skip to main content
Glama

πŸš† irctc-mcp

Live Indian Railways data for any AI assistant β€” via the Model Context Protocol.

Trains between stations, real-time seat availability, fares, PNR status and full timetables. No API key. No signup. No config.

License: MIT Node TypeScript MCP API key


What it does

Ask your assistant things like:

"Delhi se Mumbai kal ki trains dikhao, 3A me seat hai kya?"

"Compare Rajdhani vs Duronto for Howrah–New Delhi on 5 October β€” cheapest with confirmed seats."

"Check PNR 4517896230 and tell me if my waitlist will clear."

…and it answers from live railway data, not from the model's memory.

**Howrah Junction (HWH) -> New Delhi (NDLS)** on 2026-10-05
2 passenger(s), General quota, ranked by balanced.

| Train | Name                    | Timing               | Duration | Class | Availability | Fare (2 pax) |
| 12301 | Howrah Rajdhani Express | 16:50 -> 09:55 (+1d) | 17h 05m  | 3A    | AVAILABLE-31 | Rs 7,812     |
| 12301 | Howrah Rajdhani Express | 16:50 -> 09:55 (+1d) | 17h 05m  | 2A    | RAC 10       | Rs 10,888    |

**Best match:** 12301 Howrah Rajdhani Express, departing 16:50, 17h 05m journey.

Related MCP server: YatraSaarthi MCP Server

πŸ›  Tools

Tool

What it returns

search_stations

Station lookup by name or code, with disambiguation

find_trains_between_stations

Direct trains for a route and date β€” timings, duration, classes

get_train_schedule

Full stop-by-stop timetable: arrival, departure, halt, distance, day

check_seat_availability

Live availability β€” AVAILABLE / RAC / WL / REGRET + confirmation prediction

get_fare

Live quoted fare per class and quota

get_pnr_status

Per-passenger booking and current status, coach and berth

plan_journey

One-shot planner: finds trains, prices them, checks seats, ranks the options

list_reference_data

Class and quota code reference (3A, SL, TQ, …)

Plus 3 resources (irctc://stations, irctc://trains, irctc://reference and an irctc://train/{number} template) and 2 prompts (plan_trip, check_my_booking).

Every tool returns readable Markdown and structuredContent, so a client can render prose or consume the JSON.

Station names are resolved for you

"NDLS", "New Delhi", "mumbai central" all work. When a name is genuinely ambiguous, it asks instead of guessing:

"delhi" matches more than one station.
Hint: NDLS = New Delhi; DLI = Delhi Junction; NZM = Hazrat Nizamuddin; ...

πŸš€ Quick start

git clone https://github.com/<your-username>/irctc-mcp.git
cd irctc-mcp
npm install          # installs + builds
npm start            # live, no key needed

Connect to Claude Desktop

Edit claude_desktop_config.json:

  • Windows β€” %APPDATA%\Claude\claude_desktop_config.json

  • macOS β€” ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "irctc": {
      "command": "node",
      "args": ["/absolute/path/to/irctc-mcp/dist/index.js"]
    }
  }
}

Windows tip: use forward slashes β€” C:/Users/you/irctc-mcp/dist/index.js β€” or escape them as \\. A single \ is invalid JSON and is the most common setup mistake.

Fully quit Claude Desktop (tray icon β†’ Quit, not just the window) and reopen.

Connect to Claude Code

claude mcp add irctc -- node /absolute/path/to/irctc-mcp/dist/index.js

Inspect it manually

npm run inspect      # MCP Inspector

πŸ”‘ Why no API key?

Most "Indian Railways API" projects hand you a signup page. This one doesn't, because the endpoints the public enquiry sites use are reachable directly.

The useful find: one ConfirmTkt search call returns trains, live seat availability, quoted fares and confirmation predictions together β€” so the three most valuable tools resolve from a single cached request.

Optional: setting IRCTC_RAPIDAPI_KEY adds a RapidAPI source at the front of the chain. Nothing requires it.


πŸ— How it works

Every provider implements one RailProvider interface, and a chain picks the first source that can actually answer each call:

[RapidAPI if key set]  β†’  ConfirmTkt  β†’  eRail  β†’  station directory

They cover different things on purpose β€” ConfirmTkt has live availability but no route data; eRail has full routes but no availability. Chaining them per-capability gets every tool its best source, and adding a new provider is one file with zero changes to the tool layer.

Provider

Key?

Covers

confirmtkt

No

Stations, trains between, live availability, fares, predictions, PNR

erail

No

Trains between, stop-by-stop schedules

rapidapi

Optional

Full coverage via a keyed aggregator

station-directory

No

Station codes from a bundled directory (static reference data)

mock

No

Deterministic offline sample data for development

Failures are reported, never faked

If every source fails, the tool returns an error naming what was tried. It does not quietly fall back to estimates, and it does not report an outage as "no trains found" β€” those are two different answers and the code keeps them apart.

Offline mode

IRCTC_PROVIDER=mock npm start

Runs on a bundled dataset of 82 stations and 24 real trains. Availability and PNR are simulated (deterministic, so they stay self-consistent), every response is labelled OFFLINE MODE, and the server instructions tell the model to say so.


βš™οΈ Configuration

Variable

Default

Meaning

IRCTC_PROVIDER

auto

auto, confirmtkt, erail, rapidapi, mock

IRCTC_RAPIDAPI_KEY

β€”

Optional: adds a keyed source at the front of the chain

IRCTC_RAPIDAPI_HOST

irctc1.p.rapidapi.com

Alternate RapidAPI listing

IRCTC_TIMEOUT_MS

15000

Per-request timeout

IRCTC_OFFLINE_FALLBACK

false

Append the offline estimator as a last resort

Responses are cached in-process β€” 60s for volatile data, up to 24h for schedules and station lists β€” to keep upstream call volume low.


πŸ§ͺ Testing

npm run test:parsers   # 9 parser tests
npm run smoke          # 39 end-to-end checks
npm run test:all       # build + both

parsers.test.mjs runs the upstream parsers against verbatim captured live payloads, so format regressions are caught without network access. This caught two real bugs during development:

  • eRail's route payload opens with ^ rather than ~^ β€” the naive split silently dropped every train's origin station.

  • A waitlist string like RLWL5/WL3 must report the position after the last WL (current), not the first (booking-time).

smoke.mjs spawns the built server with a real MCP client and exercises every tool, resource and prompt, including error paths: unknown train, malformed PNR, class not on that train, bad date format, travelling the wrong way along a route.


πŸ“ Project structure

src/
  index.ts              stdio entry point
  server.ts             wires tools, resources and prompts onto McpServer
  types.ts              domain types, class/quota vocabularies, RailDataError
  data/                 bundled station directory and offline sample timetable
  providers/
    provider.ts         the RailProvider interface
    chain.ts            per-capability failover
    confirmtkt.ts       key-free live: trains, availability, fares, PNR
    erail.ts            key-free live: trains, stop-by-stop schedules
    rapidapi.ts         optional keyed live provider
    directory.ts        bundled station lookup
    mock.ts             offline estimator
    index.ts            env config and provider factory
  tools/register.ts     the eight tool definitions
  util/                 dates (IST), http client, fare model, formatting
scripts/
  parsers.test.mjs      parser tests against real captured payloads
  smoke.mjs             end-to-end MCP session over stdio JSON-RPC

Adding a data source

Implement RailProvider and register it in src/providers/index.ts. Nothing in the tool layer changes.

export class MyProvider implements RailProvider {
  readonly name = 'my-provider';
  readonly isLive = true;
  async searchStations(query: string, limit: number) { /* ... */ }
  // ...
}

Throw RailDataError(code, message, hint?) for anything the user can act on β€” the tool layer turns it into a clean tool error with the hint attached.


⚠️ Disclaimer

Read this before depending on it.

  • This project is not affiliated with, endorsed by, or connected to IRCTC or Indian Railways.

  • It is read-only. It cannot book, cancel or pay for tickets, and it never will. Booking must be completed on IRCTC or through an authorised agent.

  • There is no official free public API for Indian Railways passenger data. The sources used here are the endpoints public enquiry sites call. They are unofficial and best-effort: they can change or break without notice, and using them may be subject to those sites' terms of service.

  • Always verify on IRCTC before booking or travelling. Do not treat this data as authoritative.

  • Fine for personal use, learning and development. For anything commercial, the honest path is an IRCTC agent licence or a paid aggregator with a contract behind it.

πŸ“„ License

MIT

Available Tools

8 tools
check_seat_availabilityCheck seat availabilityA

Seat or berth availability for one train, class and quota on a date. Returns the railway status string (AVAILABLE / RAC / WL / REGRET) and, where known, a confirmation estimate.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesAlighting station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
dateNoJourney date as YYYY-MM-DD, or "today" / "tomorrow". Defaults to today in IST.
fromYesBoarding station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
quotaNoBooking quota (default GN = General).
trainNumberYesFive digit train number.
travelClassYesClass to check, e.g. "3A".

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It does well by enumerating the possible status values (AVAILABLE / RAC / WL / REGRET) and qualifying the confirmation estimate with 'where known'. This gives an agent realistic expectations about output and uncertainty, though it does not cover rate limits or error behavior.

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 with no padding. The primary scope is front-loaded, and the output contract is communicated compactly. Every 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?

Given no output schema, the description adequately explains the return value (status string plus confirmation estimate). The schema covers all parameters, so an agent can call the tool correctly. A minor gap is that the format of the 'confirmation estimate' is not described, but this does not block selection or invocation.

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?

The input schema has 100% description coverage, so the description does not need to repeat parameter details. The prose adds minor context by grouping train, class, and quota as the core selection criteria, but it does not add semantic meaning beyond what the schema already 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 specifies the resource (seat/berth availability), the scope (one train, class, quota, and date), and the key output (status string and confirmation estimate). This distinguishes it from sibling tools like get_fare, get_pnr_status, and find_trains_between_stations even without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The scope wording implies that this tool is for checking availability on a specific already-identified train, rather than for searching trains or faresable. However, it does not explicitly state when to use it instead of siblings, nor does it mention any exclusions or alternative tools.

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

find_trains_between_stationsFind trains between two stationsA

List direct trains connecting two stations on a given date, with departure, arrival, duration and available classes. Station names are accepted and resolved automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesDestination station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
dateNoJourney date as YYYY-MM-DD, or "today" / "tomorrow". Defaults to today in IST.
fromYesOrigin station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
sortByNoSort order (default departure).
travelClassNoOnly trains offering this class.
onlyRunningOnDateNoDrop trains that do not run on the given date (default true).

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral transparency burden. It does well by disclosing that only direct trains are listed, what output fields are included, and that station names are resolved automatically. It does not cover error/no-result behavior or limits, but for a read-only query tool this is adequate.

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 short, front-loaded sentences with no filler. Every sentence contributes meaningful information: the first defines the primary behavior and output, the second clarifies station input handling.

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?

There is no output schema, so the description compensates by listing key return fields: departure, arrival, duration, and available classes. It also clarifies station input behavior. An explicit pointer to plan_journey for multi-leg trips would improve completeness, but the core details are present.

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?

The input schema already describes all six parameters with 100% coverage, including formats, defaults, and enums. The description only adds the station-name resolution behavior, which is already reflected in the schema. Baseline 3 is appropriate.

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 states a specific action and resource: 'List direct trains connecting two stations on a given date, with departure, arrival, duration and available classes.' The phrase 'direct trains' helps distinguish it from sibling tools like plan_journey, which likely covers multi-leg routes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: when a user wants direct trains between two stations on a specific date. However, it does not explicitly mention alternatives or explain when to prefer plan_journey, get_train_schedule, or check_seat_availability instead.

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

get_fareGet ticket fareA

Itemised fare for a train, class and quota between two stations: base fare, reservation and superfast charges, catering, dynamic surcharge and GST.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesAlighting station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
dateNoJourney date as YYYY-MM-DD, or "today" / "tomorrow". Defaults to today in IST.
fromYesBoarding station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
quotaNoBooking quota (default GN = General).
passengersNoNumber of passengers, for a total (default 1).
ageCategoryNoPassenger category for concessions (default adult).
trainNumberYesFive digit train number.
travelClassYesClass to price, e.g. "SL".

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses that the result is itemized into base fare, reservation/superfast charges, catering, dynamic surcharge, and GST. However, it does not mention absence of side effects, possible errors, or behavior around unavailable fares; the read-only nature is only implied by the name.

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 a single, front-loaded sentence with no filler. The core object appears immediately, and the enumeration of fare components adds useful detail 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?

For a read-only fare query with 8 parameters but no output schema, the description and schema together are largely sufficient. It explains what the returned fare will include, while optional defaults and parameter enums are already in the schema. The main gap is not explicitly routing to/from sibling tools or describing error behavior.

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 100%, so the baseline is 3. The description paraphrases key dimensions like train, class, quota, and stations, but adds no extra meaning beyond what the schema already documents for each parameter.

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?

The description clearly states what resource is produced: an itemized fare for a specific train, class, quota, and station pair. It is distinguishable from siblings like get_pnr_status and check_seat_availability because it focuses on fare breakdown, not status or availability. It lacks an explicit verb, but "Itemised fare" is still a clear and specific object.

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 context is clear: use this when you need the fare for a train, class, quota, and stations. The description does not explicitly name alternatives or say when not to use it, but the distinction from seat availability and PNR status tools is reasonably evident from the domain.

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

get_pnr_statusGet PNR statusA

Current status of a 10 digit PNR: train, journey date, route, class and per-passenger booking and current status (CNF / RAC / WL) with coach and berth.

ParametersJSON Schema
NameRequiredDescriptionDefault
pnrYes10 digit PNR number.

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It reveals what information is returned and the status codes, which is helpful. However, it does not explicitly state that this is a read-only lookup, what happens for invalid/unknown PNRs, or whether the data reflects a point-in-time snapshot.

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?

One focused sentence that front-loads the purpose and then uses a compact list to enumerate the response contents. No filler or 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?

For a single-parameter lookup, the description supplies enough context to invoke it: it states the input and the key output components. It is slightly incomplete because there is no output schema and no mention of invalid-PNR behavior or response envelope, but the listed fields largely compensate.

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?

The schema already documents the single pnr parameter at 100% coverage, so the baseline is 3. The description mostly restates the '10 digit' nature and adds no format details or edge-case handling beyond the schema. Minor inconsistency: description says 10 digits while schema maxLength allows 13.

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?

Clearly identifies the operation as retrieving current PNR status and enumerates the returned details (train, date, route, class, per-passenger booking/current status, coach/berth). This is distinct from sibling tools focused on station search, schedules, fares, and availability.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this vs alternatives, no prerequisites, exclusions, or typical scenario. The intended use must be inferred from the tool name and the PNR parameter; nothing in the text says 'use this when the user has a PNR to check' or contrasts with sibling tools.

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

get_train_scheduleGet a train timetableB

Full stop-by-stop schedule for a train number: arrival, departure, halt, distance, day and platform, plus the days of the week it runs.

ParametersJSON Schema
NameRequiredDescriptionDefault
trainNumberYesFive digit train number, e.g. "12951".

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description must carry the burden of behavioral disclosure. It does add value by detailing the output content (arrival, departure, halt, etc.) and implying a read-only operation. However, it does not disclose error handling for invalid train numbers, response format, or any rate/access limitations, leaving gaps for an agent.

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 a single, front-loaded sentence that leads with the primary purpose and then lists the specific return fields. There is no fluff or redundant wording, and every phrase contributes to understanding the tool's output.

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?

For a tool with only one parameter, no annotations, and no output schema, the description covers the essential return details (schedule fields and running days) sufficiently for a basic schedule lookup. It is not fully complete because it omits error behavior and edge cases, but the low complexity means the description is mostly adequate.

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?

The input schema already provides full coverage for trainNumber with type, length constraints, and an example ('12951'). The description merely refers to 'a train number' and adds no deeper meaning about parameter format, allowed values, or how the parameter affects the result, so it stays at the schema-coverage baseline of 3.

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?

The description clearly states the tool returns a 'Full stop-by-step schedule for a train number' and lists the specific fields (arrival, departure, halt, distance, day, platform, days of week). This makes the purpose obvious and implicitly distinguishes it from siblings like find_trains_between_stations, but it does not explicitly name an alternative or specify what it is not.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus siblings such as plan_journey, find_trains_between_stations, or check_seat_availability. The description only states what the tool returns, without any context on preferred use cases, prerequisites, or exclusions.

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

list_reference_dataList classes and quotasA

Reference list of Indian Railways travel class codes and booking quota codes, for interpreting or constructing other tool calls.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoWhich reference list to return (default both).

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. 'Reference list' implies a read-only, static data retrieval, which is a useful behavioral hint, but the description does not explicitly state that it makes no modifications, returns cached data, or any other behavioral characteristics. It adds 'for interpreting or constructing other tool calls' as context, but is not fully transparent about side effects.

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 a single clear sentence that front-loads the resource type and purpose. It contains no redundant words, but could have been slightly more direct (e.g., 'Lists...' rather than 'Reference list...'). Overall efficient and well-structured.

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?

For a simple tool with one optional parameter, full schema coverage, and no output schema, the description adequately covers what the tool provides. It does not describe the return value structure, but this is not required given the simplicity and the fact that no output schema exists.

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?

The schema has 100% description coverage for the single 'kind' parameter, including its enum values. The description itself adds no parameter-specific information, but per the baseline rule, when schema coverage is high the description need not repeat parameter details.

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?

The description clearly identifies the tool as a reference list for Indian Railways travel class codes and booking quota codes, with a stated purpose of interpreting or constructing other tool calls. It is specific about the resource and distinct from the operational siblings like check_seat_availability or get_fare, though it does not explicitly name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: 'for interpreting or constructing other tool calls', which tells the agent when this reference data is needed. However, it does not explicitly contrast with sibling tools or give conditions for when not to use it, leaving the guidance largely implicit.

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

plan_journeyPlan a rail journeyA

One-shot journey planner: finds trains between two stations on a date, then checks availability and fares for the preferred classes and ranks the options. Use this instead of chaining the individual tools when the user asks how to get from A to B.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesDestination station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
dateNoJourney date as YYYY-MM-DD, or "today" / "tomorrow". Defaults to today in IST.
fromYesOrigin station: either the station code (e.g. "NDLS") or the name (e.g. "New Delhi").
quotaNoBooking quota (default GN).
maxOptionsNoHow many trains to evaluate (default 5).
passengersNoPassenger count (default 1).
optimiseForNoRanking objective (default balanced).
preferredClassesNoClasses to price and check, best first (default ["3A","SL"]).

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It clearly discloses the multi-step orchestration: finding trains, checking availability and fares for preferred classes, and ranking options. It does not mention failure modes, execution time, or the fact that it does not create bookings, but the core behavior is transparent.

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?

Two sentences with no waste: the first defines what the tool does, and the second gives clear usage guidance. The key information is front-loaded, and every sentence earns its place.

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?

The description is adequate for a high-level one-shot planner: it explains purpose, main inputs, and ranking behavior, while the schema covers all 8 parameters in detail. However, with no output schema and no description of the returned ranked options, error cases, or edge conditions, it has clear gaps that could affect an agent's confidence in interpreting results.

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 100%, so the schema already documents all parameters, defaults, constraints, and enums. The description adds only marginal conceptual context, such as 'preferred classes' and 'ranks the options', but does not need to compensate for missing parameter documentation.

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 states a specific verb and resource: it is a one-shot journey planner that finds trains, checks availability and fares, and ranks options. It also distinguishes itself from sibling tools by explicitly saying it replaces chaining the individual tools, so an agent can clearly tell it apart.

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 explicitly tells the agent when to use this tool: 'Use this instead of chaining the individual tools when the user asks how to get from A to B.' This clearly communicates the condition and points to the alternative approach, leaving no ambiguity about when the tool is appropriate.

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

search_stationsSearch railway stationsA

Find Indian Railways stations by name or code. Use this first when the user names a city rather than a station code, since most other tools need codes.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 8).
queryYesStation name, partial name, or code.

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. 'Find' implies a read-only lookup, but it does not explicitly state non-destructiveness, response format, or rate limits. Adequate but minimal disclosure beyond the obvious read nature.

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?

Two sentences, zero waste. The primary purpose is front-loaded, followed immediately by a key usage directive. Every word contributes.

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?

For a simple 2-parameter search tool with no output schema, the description covers purpose and usage. It also implicitly promises that results include codes, which is essential for downstream tools. Minor gaps (e.g., no note on pagination or response shape) are acceptable given the tool's simplicity.

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 coverage is 100%, so the schema already documents both parameters. The description adds 'by name or code,' which aligns with the schema's query description but does not add significant new meaning.

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?

States a specific verb and resource: 'Find Indian Railways stations by name or code.' It further differentiates from sibling tools by noting that most other tools require codes, making it clear this is the lookup/conversion tool.

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?

Provides explicit context: 'Use this first when the user names a city rather than a station code, since most other tools need codes.' It gives a clear when-to-use condition and implies the alternative (other tools need codes), though it does not name specific siblings.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv1.0.0
    • First observedcheck_seat_availability
    • First observedfind_trains_between_stations
    • First observedget_fare
    • First observedget_pnr_status
    • First observedget_train_schedule
    • First observedlist_reference_data
    • First observedplan_journey
    • First observedsearch_stations

TDQS

A3.8/5.0

Scored across 8 tools

Disambiguation3/5

Most tools target distinct resources, but there is overlap between search_stations and find_trains_between_stations since both can accept station names, and plan_journey subsumes find_trains plus availability/fare. Descriptions mitigate this somewhat by clarifying intended use, but an agent could still misselect.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern (search_stations, get_fare, list_reference_data, etc.). Even longer names like find_trains_between_stations remain predictable and readable.

Tool Count5/5

Eight tools is well within the ideal range and matches the server's scope of Indian Railways information and journey planning. No tool feels redundant or excessive; each covers a distinct aspect of the travel workflow.

Completeness4/5

The surface covers the core journey-planning lifecycle: station lookup, trains, schedule, availability, fare, PNR status, and a reference list. Minor gaps exist, such as live train running status and connecting-route discovery, but these are workaround-able and not critical for the apparent purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables real-time Indian Railways information retrieval, including live train running status, station schedules, and upcoming arrivals/departures.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables checking railway seat availability, berth types, and pricing for Indian trains through natural language queries.
    -
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for Indian Railways data, enabling AI agents to search trains, get schedules, live status, PNR info, and more without an API key.
    11
    6 npm
    MIT