Model Context Protocol server to enable AI Agents get live updates on Indian Railways PNR number and train running status
The server has 19 tools with consistent verb-noun naming and documented input schemas. All tools have descriptions (40-150 chars on average). However, descriptions lack LLM-specific guidance on WHEN to call each tool vs. alternatives, and output schemas are not documented in tool definitions. No parameter descriptions explain constraints, ranges, or expected formats. Error handling is minimal, tools return plain strings with no guidance on recovery steps. The PNR and train status tools are well-structured but lack differentiation: get_pnr_journey_overview, get_pnr_passenger_summary, and get_complete_pnr_summary have overlapping scope with no clear agent-facing guidance on which to call. No output schema examples. Security: PNR lookups take plaintext PNR numbers (no mention of data sensitivity or access controls in tool definitions).
Get the Coach IDs (or numbers) and the Seat/Berth Details of all passengers corresponding to a PNR Number.
Get a complete summary of the PNR including journey details and all passenger information. This is a comprehensive view of the entire PNR.
Get Indian Railways ticket confirmation status of all passengers corresponding to a PNR Number.
Get the current date and time in Indian Standard Time (IST). Useful for calculating days until journey, checking if a train has departed, etc.
Calculate the absolute difference in days between two dates.
Get information about the last station a train has stopped at or is currently at.
Overlapping PNR tools lack LLM differentiation guidance. Three tools query PNR data (get_pnr_journey_overview, get_pnr_passenger_summary, get_complete_pnr_summary) with no description explaining which to call for different user intents. An LLM cannot distinguish between 'summarize the journey' and 'get passenger details' without clearer naming or scope documentation.
No output schemas documented in tool definitions. The code generates formatted string responses (e.g. from lib/pnr.py check_confirm_status), but tool definitions do not declare return types or field structure. LLMs cannot plan downstream operations when output structure is invisible.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 55 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 41 | - | v1 |
Get the current live status and position of an Indian Railways train.
Get basic journey information for a PNR - source/destination stations, ticket fare, date/time of journey, journey-class, ticket booked on, no. of passengers.
Get a summary of all passengers with their current status, coach, and berth information.
Get the updated position of passengers in waiting list corresponding to a PNR Number.
Search for Indian Railway station codes by station name.
Get the expected arrival time of a train at a specific station.
Get the expected departure time of a train from a specific station.
Get the train number and name from a PNR Number.
Search for train numbers by train name or number.
Get the complete route of a train with all stations, timings, and distances.
Get live train status using PNR number. This automatically calculates the correct start_day based on the train's source departure date from the PNR. This is the recommended way to check train status when you have a PNR, as it ensures the correct train run date is used.
Get a comprehensive summary of a train including current status, route, upcoming stations, and journey progress.
Get a list of upcoming stations for a train with their expected arrival/departure times and distances.
Parameter descriptions in input schemas lack constraint details. The PNR parameter is described as '10-digit PNR code (example: 8341223680)' in some tools, but others say only '10-digit PNR code' with no validation hint. Example values in descriptions risk LLM literal reuse. No mention of format constraints, length validation, or character restrictions for train_number or station_code (e.g. 'The train number as a string (e.g., "12618")', should specify 4-5 digit numeric string).
Error handling returns plain strings with no recovery guidance. The code in lib/pnr.py returns 'PNR data not available.' or 'No passenger information available.' as strings. Tool definitions provide no guidance to LLMs on what to do next: should the agent retry? Call a discovery tool? Ask the user for clarification? No categorization of errors as retryable, user-fixable, or fatal.
Tool descriptions lack WHEN-to-use guidance. Descriptions state WHAT the tool does but not WHEN or WHY to call it instead of a related tool. For example, 'Get the Coach IDs... of all passengers' vs 'Get a summary of all passengers with their current status, coach, and berth information', no guidance on which to call for a coach lookup.
No pagination or result limits declared. Tools like get_train_route, get_upcoming_stations, and get_station_codes_from_name may return large lists (all stations on a route, all matching stations), but tool definitions do not mention limits, pagination, or max result counts. Returning unbounded lists to LLMs risks context exhaustion.
Security concern: PNR lookups expose sensitive passenger data with no access control hint. Tools like get_confirm_status, get_coaches_and_berths, and get_complete_pnr_summary return full passenger details (names, berth assignments, booking dates) given only a PNR. Tool definitions do not document access controls, data sensitivity, or any authentication/authorization checks. No mention of GDPR compliance, data retention, or audit trails.
Tool naming ambiguity in train status lookups. get_live_train_status and get_train_status_using_pnr both retrieve train status; the distinction is implementation detail (PNR vs direct train number). Tool descriptions mention this but naming could be clearer, e.g. 'get_train_status' (primary) and 'get_train_status_for_pnr' (convenience).