japan-rail-mcp
japan-rail-mcp
japan-rail-mcp ist ein schreibgeschützter (read-only) Server für das Model Context Protocol, der strukturierte japanische Bahndaten bereitstellt. Version 0.1 ist bewusst Shinkansen-first: Sie enthält einen nützlichen, ohne Zugangsdaten nutzbaren Stationskatalog und kann über den Standardplan-Schlüssel der Ekispert API eines Deployment-Inhabers Live-Shinkansen-Fahrpläne, Fahrpreise, Sitzklassen und Haltestellen abfragen.
Der Server bucht nie Tickets, meldet sich nicht in Bahnkonten an, umgeht keine Zugriffskontrollen, zieht keine Betreiber-Websites ab und präsentiert keine Testdaten als echte Live-Daten.
japan-rail-mcp ist dazu entwickelt, eine gemeinsame konzeptuelle Schnittstelle mit china-rail-mcp zu nutzen, mit dem langfristigen Ziel, interoperierbare Schemas für Bahn-MCP-Server über Länder hinweg zu etablieren.
Dies ist eine experimentelle Interoperabilitätskonvention und kein offizieller Bahn- oder MCP-Standardd.
Funktionen
Fähigkeit | Ohne API-Schlüssel | Mit |
Japanische, englische und romanisierte Stationssuche | Ja, mit dem gebündelten Katalog für 58 Shinkansen-Stationen | Ja |
Mehrdeutige Stationskandidaten | Ja | Ja |
Direkte Shinkansen-Fahrplansuche | Ausdrücklich nicht unterstützt | Ja, abhängig vom Plan des Schlüssels |
Fahrpreisbeträge in numerischem JPY | Ausdrücklich nicht unterstützt | Ja |
Normalisierung der Sitzklassen | Ausdrücklich nicht unterstützt | Ja |
Geordnete Zugstopps | Ausdrücklich nicht unterstützt | Ja |
Reservierungsschutz Verhältnis / Sitzverfügbarkeit | Ausdrücklich nicht unterstützt | Ausdrücklich nicht unterstützt |
Verbindungssuche mit Umstiegen | Ausdrücklich nicht unterstützt in v0.1 | Ausdrücklich nicht unterstützt in v0.1 |
Alle Erfolgsmeldes enthalten enthalten Herkunftsnachweise. Bahn-Zeitstempel sind explizite ISO-8601-Werte mit dem Japan-Offset, zum Beispiel 2026-08-26T12:03:00+09:00. Relative Datumsangaben wie „morgen“ müssen vom MCP-Client aufgelöst werden; der Server erwartet YYYY-MM-DD.
Related MCP server: japan-transit-mcp
MCP-Tools
Tool | Wann es verwendet wird |
| Prüft konfigurierte Anbieter und Fähigkeitsgrenzen vor einer Live-Anfrage. |
| Löaut einen Namen zu einer oder mehreren kanonischen |
| Sucht direkte Shinkansen-Strecken zwischen zwei auf gelösten Stations-IDs. |
| Liest die geordneten Stops für eine undurchsichtige |
| Prüft Anbieter-Unterstützung; aktuell |
| Sortiert identische strukturierte Direktzug-Kandidaten ohne subjektive Empfehlung. |
| Für Umstiege reserviert; gibt in v0.1 eine strukturierte nicht unterstützten Fehler zurück. |
Jedes Tool ist als schreiby, nicht-destruktiv und idempotent annotiert. Jedes erfolgreiche Toolergebnis enthält sowohl menschenlesbaren JSON-Text als auch MCP-structuredContent, das gegen ein Ausgabeschema validiert wurde.
Installation
Voraussetzungen: Node.js 22 oder neuer. CI nutzt Node.js 24 LTS.
git clone https://github.com/TakeruF/japan-rail-mcp.git
cd japan-rail-mcp
npm install
npm run buildStarte den Stdio-Server:
npm startNach einem npm-Release können Clients Komponente ihn alternativ starten mit:
npx -y japan-rail-mcpLive-Shinkansen-Daten
Die Live-Fahrplan-Funktion erfordert einen Zugangsschlüssel, dessen Ekispert-API-Vereinbarung den „Standard Plan“-Routensuch-Endpunkt einschließt. Der kostenlose Plan enthält diesen zentraled-Endpunkt nicht.
export EKISPERT_API_KEY='your-own-key'
npm startDer Schlüssel wird nur an den konfigurierten Ekispert-API-Endpunkt gesendet. Er wird nie in Tool-Ergebnissen zurückgegeben oder, r in Anbieter-Fehlern aufgeführt. Das Projekt enthält keinen gemeinsamem Schlüssel, unter Kunden keine Anbieterdaten und setzt nicht die Transaktionslimits des Vertrags außer Kraft.
Client-Konfiguration
Claude Desktop
Fügen Sie für ein lokales Checkout einen Eintrag wie diesen hinzu bzw. ersetzen Sie den absoluten Umlauf:
{
"mcpServers": {
"japan-rail": {
"command": "node",
"args": ["/absolute/path/to/japan-rail-mcp/dist/index.js"],
"env": {
"EKISPERT_API_KEY": "your-own-key"
}
}
}
}Nur für die Stationssuche können Sie das env-Objekt weglassen. Bevorzugt wird die Ge not printing-Verwaltung des Clients zur Abspeicherung des Schlüssels.
CodeDer
Registrieren Sie den erzeugten Stdio-Befehl mit Codes MCP-Konfiguration oder nutzen Sie in Codex die CLI-Form, sofern sie der von Ihnen installierte Codex unterstützt:
codex mcp add japan-rail -- node /absolute/path/to/japan-rail-mcp/dist/index.jsStellen Sie EKISPERT_API_KEY für Rail-Livedaten stets über die Prozessseinstellung oder die Codex-Geheim-Konfiguration bereit.
Tool-Beispiele
Zuerst die Stationskandidaten auflösen:
{
"query": "Osaka"
}Das Ergebnis beinhaltet bewusst beides, wenn relevant: Osaka und Shin-Osaka. Danach die genauen IDs nutzen:
{
"fromStationId": "jp:station:tokyo",
"toStationId": "jp:station:shin-osaka",
"date": "2026-08-26",
"departureAfter": "12:00",
"serviceTypes": ["shinkansen"],
"limit": 10,
"offset": 0
}A normaler Fahrpreis is numerisch und währungssicher:
{
"amount": 14720,
"currency": "JPY",
"formatted": "¥14,720",
"kind": "total"
}formatted ist nur für Anzeige; für Anzeigen Vergleiche sollen Clients amount und currency verwenden.
Datenquellen
Eingebündeter Stationskatalog
Der vom Projekt verwaltete Katalog enthält 58 wichtige Stationen: das aktuelle Shinkansen-Netz plus eine kleine Reihe mit bewusst mehrdeutigen Vergleichs-Orten wie Osaka, St.-Stations der Region Shinjuku und Fukuoka in Kyoto. Er enthält nur statische Metadaten der Störungen – keine Fahrpläne, Fahrpreise oder Verfügbarkeitsdaten. Er verlinkt Fahrplan-Karten und Reise-Seiten in der Quellenbewertung.
Ekispert-API
Der optional-de Anbieter verwendet dokumentierte API-Endpunkte und einen Schlüssel eines }} owners. Er fragt explizite Datumsangaben, mit explizitem Nachternur wenn nicht an provided, zudem um Stops, Klassen und Anbieterinfos. Antworten collection ekispert-standard, das Dataset-Report the Schemas, die abstract retrieval time, realtime Status and the Vertragsgrenze des Anbieters.
Shinkansen-Zeittabellen: Nicht verwendete Quellen
Die aktuelle ODPT-JR-East-Datei für Zugzeittabellen schließt Shinkansen explizit aus.
GTFS-JP v4 ist eine Spec, kein nationaler Feed und keine Pauschallizenz.
Öffentliche JR-Fahrplan-Seiten und PDFs bieten dem Projekt keine zwickende API oder einen Weitergabe-Nachlass, und werden deshalb weder herausgesreet noch anders ins Bundle aufgenommen.
Zum Datenstand und primären Quellen siehe docs/data-sources.md.
Architektur
MCP tools
-> RailService
-> StationCatalogProvider
-> StaticShinkansenStationProvider
-> RailDataProvider
-> EkispertProvider (optional key)
core rail schemas
+ Japan extensions
+ provider-private parsing and identifiersMCP-Handler validierten und beschreiben Tool-Aufrufe, laden aber keine Anbieterdaten und no parsing. Fähigkeitsprüfungen schlagen vor jedem Netzwerkzugriff geschlossen fehl. search_trains repräsentiert einen direkten physischen Zug; search_journeys repräsentiert eine Fahrplanreiseroute mit möglichenestination Umstiift. Für die Extraktions-Grenze siehe docs/architecture.md.
Beziehung zu china-rail-mcp
Die gemeinsamen Tool-Namen sind:
search_stationssearch_trainsget_train_detailsget_availabilitycompare_trains
Die gemeins Amenomen-Tabellen sind Station, StationRef, Train, Journey, Fare, SeatClass, SeatAvailability, Source, RailError und RailProviderCapabilities. Der ictional contract hält fest: sowohl Fahrpreise gemäß ISO 4217 als auch explizite länderspezifische Zeitausgleitung, Wissensherkunft, kanonische Stations-IDs über alle, sowie Fahrpreise-Check und mit strukturierte Fehler.
Japan-spezifische Details liegen unter extensions.japan, notamment darunter:
Shinkansen-Linien und Servicenamen
Anbieter-Stationsnamen
Fernden zugnummern vs. operativen Anbieter-Ident-Technik
japanische Sitzbezeichnung wie
自由席,指定席,グリーン車undグランクラス
Diese Grenzen sind Kandidaten für eine panied und zip rail-mcp-spec; dieses Repository beansprucht nicht, dass diese Norm bereits existiert.
Einschränkungen
Ohne installierte Zugangsdaten können reine Stationen gesucht werden.
Live Zugverhalten ist von Test-Fixtures unterlegt, aber hier nicht mit real Account testet. Valide Fixtures sind no proof of production-Provider-Anschluss.
Bound Ekispert StandardPlan, Limits, zulässige Darstellung, kommerzielle Nutzung, Caching und Weitergaber seine rights depend on owner/Betreiber.
Die Suchtreffer sind auf 20 Antworten pro Request begrenzt.
search_trainsgibt ihr dieselbe nur direkte Shinkansen-Strecken ZU. Umstiege are not stumple dünner.Öffentliche Stände: Sitz und Fahrpreise sind not gleich Sitzinventar. Geräte sonst
get_availabilityunuspported.Pünktliche Störungen und Realtime-Zugpositionen missing.
Der Stationskatalog ist Shokansen-at-focus, keine vollständige station database.
Travell- und Ticketkondition condition Prüfungen müssen über den Kundendienst oder ein authorisierten Distributionskanal erfolgen.
Entwicklung
npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run formatKovertierte Tests: JA/EN Stationssuche, Mehrdeutigkeit, Tokyo–Shin-Osaka-Fixture parsing, examined Zeitpunkte/Tokyo-Zeitsonne, Providerfehler, Verweigerung von flash: “…”, MCP- structured output, Readonly-Annotation sowie wieder verwendbaren shared-Rail-Schema-Vertrag.
Sicherheit und Read-only-Umfang
Es gibt keine Ticketbuchung, Reservation, Einloggende, Bezahl, CAPTCHA, Konto as cap no or mutation Tools. Details zur Zugangsverwaltung in SECURITY.md.
Lizenz
Der Projektspielstand wird unter MIT-Lizenz bereit gehalten. Diese Lizenz bezieht sich auf den Datenbestand im Repo, nicht auf fremde Bahndatenungen, Ekispert-Antwortdaten sind Inhalt, enthält die GmbH lizenziert, GTFS-Feeds oder markenrechtliche Drittprodukte. Each Quelle unterliegt den eigenen Bedingungen.
Available Tools
7 toolscompare_trainsCompare direct Shinkansen trainsBRead-onlyIdempotent
Use to sort structured direct-train candidates by departure, arrival, duration, or total fare. This tool does not make a subjective recommendation.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| limit | No | ||
| offset | No | ||
| sortBy | No | departure_time | |
| operators | No | ||
| toStationId | Yes | Canonical ID returned by search_stations. | |
| serviceTypes | No | ||
| fromStationId | Yes | Canonical ID returned by search_stations. | |
| departureAfter | No | ||
| departureBefore | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| limit | Yes | |
| total | Yes | |
| offset | Yes | |
| trains | Yes | |
| hasMore | Yes | |
| returned | Yes | |
| nextOffset | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the behavioral note that it does not provide a subjective recommendation, which is useful context not present in annotations. However, it doesn't describe what happens to the input (e.g., whether it returns a new sorted list or modifies in place), though given readOnly and idempotent hints, this is largely implied. The description adds value but not deeply.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. The intent is front-loaded, and the clarifying statement about not making subjective recommendations is succinct and adds value without bloat. This is an appropriately concise description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 10 parameters (3 required) and schema coverage is only 20%, the description is far from complete. It doesn't explain what input structure is expected (though it says 'structured direct-train candidates'), how the tool integrates with siblings like search_trains, or the meaning of most parameters. While an output schema exists, the input semantics and usage context are inadequately described for an agent to call it correctly without additional information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 20%, meaning the description must compensate for the many undocumented parameters. The description explains the sort criteria (departure, arrival, duration, total fare) which maps to the sortBy enum, but it fails to explain other critical parameters like fromStationId, toStationId, date, limit, offset, operators, serviceTypes, and time filters. With 10 parameters and such low coverage, the description does not help an agent understand how to construct a valid request beyond the sort field.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action: sorting structured direct-train candidates by departure, arrival, duration, or total fare. It distinguishes itself from recommendation tools by explicitly noting it does not make a subjective recommendation. However, it doesn't clarify whether the tool expects a pre-fetched list or fetches its own candidates, leaving some ambiguity about its exact role relative to search tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies that the tool should be used when you have structured direct-train candidates and want to sort them, but it does not explicitly state when to use it versus alternatives like search_trains or search_journeys. It would benefit from a note like 'After search_trains returns candidates, use this to sort them' or an explicit exclusion of other tools. The note about not making a subjective recommendation gives a hint of what it does not do, but not when to choose it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_availabilityGet seat availabilityARead-onlyIdempotent
Use only to check whether the configured provider exposes seat inventory for an exact train and station pair. The default provider returns an explicit unsupported status and never fabricates inventory.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| trainId | Yes | ||
| toStationId | Yes | Canonical ID returned by search_stations. | |
| fromStationId | Yes | Canonical ID returned by search_stations. |
Output Schema
| Name | Required | Description |
|---|---|---|
| seats | No | |
| reason | No | |
| source | No | |
| status | Yes | |
| retrievedAt | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows it's a safe, non-mutating read. The description adds value by disclosing that the provider returns an explicit unsupported status and never fabricates inventory, which is a critical behavioral detail not covered by annotations. This provides meaningful context beyond the structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler. The key scope ('Use only to check...') is front-loaded, followed by a single behavioral note. Every word earns its place, and the structure is immediately scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only check with an output schema (present but not shown), the description covers the core purpose, the main behavioral nuance (unsupported status), and safety via annotations. It does not describe error conditions or validate input requirements, but given the output schema exists and the tool's simplicity, what is provided is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50%: fromStationId and toStationId have descriptions ('Canonical ID returned by search_stations.'), while trainId and date have none. The description mentions 'exact train and station pair' but does not elaborate on how to obtain trainId or the date format, nor does it reference train identifiers from any sibling tool. Since coverage is low (<80%), the description should compensate but does not, leaving two parameters poorly documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Use only to check whether the configured provider exposes seat inventory for an exact train and station pair', which names the verb (check), the resource (seat inventory), and the precise scope (exact train and station pair). This clearly separates it from sibling tools like get_train_details or search_journeys without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Use only' explicitly restricts the tool to this specific check, and the description states that the default provider may return an unsupported status. However, it does not name alternative tools for broader journey planning or explicitly state when NOT to use it, though the restriction is implicit. This is clear context but lacks named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_provider_statusGet rail provider statusARead-onlyIdempotent
Use before live train queries to see which read-only capabilities are configured and why unavailable capabilities are disabled.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| notes | Yes | |
| provider | Yes | |
| configured | Yes | |
| capabilities | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds value by explaining that it shows configuration state and the reasons for unavailable capabilities, which is beyond what annotations provide. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that places the usage guidance first and includes no filler. Every phrase contributes essential context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values are already structured. The description covers the tool's purpose, when to use it, and what it reveals, which is complete for a zero-parameter tool with annotations covering safety aspects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description carries no burden to explain parameter meaning. Per the baseline for 0-parameter tools, a score of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'see' and resource 'rail provider status', and explicitly describes what the tool reveals: which read-only capabilities are configured and why disabled capabilities are unavailable. This clearly differentiates it from sibling tools that handle live train queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives an explicit usage condition: 'Use before live train queries.' This tells the agent when to invoke it. However, it does not name alternative tools or explicitly state when not to use it, so it falls short of a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_train_detailsGet Shinkansen train detailsARead-onlyIdempotent
Use with the opaque trainId returned by search_trains to retrieve that service and its ordered stops. Do not construct train IDs manually.
| Name | Required | Description | Default |
|---|---|---|---|
| trainId | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| stops | Yes | |
| train | Yes | |
| source | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and non-destructive behavior, covering the safety profile. The description adds the 'ordered stops' detail, which hints at the response structure, but doesn't disclose additional side effects or edge cases. This is adequate given the strong annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, each earning its place. The primary usage instruction is front-loaded, and the warning about manual construction is a concise, valuable addition. No fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with an output schema available, the description covers the essential usage (source of ID, what to retrieve). An agent has everything needed to call it correctly without external context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the schema only has minLength. The description compensates by stating the trainId is opaque and must come from search_trains, not constructed manually. This adds crucial semantic meaning that the raw schema lacks.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('retrieve') and the specific resource ('that service and its ordered stops'), and explicitly ties it to the opaque trainId from search_trains. This distinguishes it from sibling tools like search_trains or compare_trains without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit usage context: use with the opaque trainId returned by search_trains, and warns not to construct IDs manually. It doesn't explicitly rule out alternatives, but the instruction is clear enough for an agent to know when to invoke it versus other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_journeysSearch transfer journeysARead-onlyIdempotent
Use for routes that may include transfers, not for an individual train. The Shinkansen-first v0.1 provider reports this capability as unsupported rather than returning direct trains under the wrong concept.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| operators | No | ||
| toStationId | Yes | Canonical ID returned by search_stations. | |
| serviceTypes | No | ||
| fromStationId | Yes | Canonical ID returned by search_stations. | |
| departureAfter | No | ||
| departureBefore | No | ||
| includeNonShinkansen | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| journeys | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, open-world, and non-destructive behavior. The description adds a valuable behavioral detail beyond those: the Shinkansen-first provider reports journey search as unsupported instead of incorrectly returning direct trains. This helps agents interpret empty or error responses correctly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences deliver the core usage rule and a provider-specific caveat with no filler. The most important guidance is front-loaded, making the description easy to scan and act on.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The selection context is strong and the output schema covers return values, but the tool has 8 parameters with only 25% schema coverage. The description does not compensate for that gap, leaving several parameter semantics unexplained for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25%, covering just fromStationId and toStationId. The description provides no explanation of operators, serviceTypes, includeNonShinkansen, departureAfter, or departureBefore, so an agent has little guidance for correctly setting most parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific, actionable rule: use this tool for routes that may include transfers, not for an individual train. This clearly separates it from search_trains and other sibling tools. The provider caveat reinforces the tool's unique role rather than blurring it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit when-to-use guidance (routes with transfers) and an explicit when-not-to-use boundary (not for an individual train). It does not name search_trains as the alternative, but the exclusion is strong enough that an agent can infer the correct routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_stationsSearch Japanese railway stationsARead-onlyIdempotent
Use this before search_trains whenever no canonical station ID is known. Returns candidates for Japanese, English, and common romanized names without silently resolving ambiguous inputs such as Osaka or Fukuoka.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| stations | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds behavioral context by stating it 'returns candidates' and explicitly says it does not silently resolve ambiguous inputs—this tells the agent to expect multiple results for ambiguous queries, which is not captured in annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with zero waste: the first delivers the usage directive, the second describes behavior. It is front-loaded with the most important instruction and stays compact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple 2-parameter schema, annotations that cover safety, and an existing output schema (which defines return values), the description covers the essential ambiguity-handling behavior. It does not explain how to use the returned candidates (e.g., passing a station ID to search_trains), but that is adequately implied by the 'use before search_trains' directive. This is complete enough for an agent to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the query parameter implicitly as a station name in Japanese, English, or romanized form, but it never mentions the 'limit' parameter at all. Since limit is optional with a default, the omission is less critical, but for a tool with only two parameters, the description should clarify both to fully address parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns station name candidates for Japanese, English, and romanized queries, and explicitly distinguishes it from the sibling search_trains by positioning it as a pre-step when no station ID is known. The verb 'Returns' and resource 'Japanese railway stations' give a precise purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use this before search_trains whenever no canonical station ID is known' gives an explicit when-to-use directive, and the note about not silently resolving ambiguous inputs (e.g., Osaka, Fukuoka) further clarifies the appropriate context. However, it does not explicitly state when to avoid this tool beyond 'when ID is known', which is implied but not explicitly framed as an exclusion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_trainsSearch direct Shinkansen trainsARead-onlyIdempotent
Use after resolving both station IDs. Searches direct Shinkansen services only, never transfer journeys. Requires an explicit date; optional time, service, and operator filters are applied before pagination.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| limit | No | ||
| offset | No | ||
| operators | No | ||
| toStationId | Yes | Canonical ID returned by search_stations. | |
| serviceTypes | No | ||
| fromStationId | Yes | Canonical ID returned by search_stations. | |
| departureAfter | No | ||
| departureBefore | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| limit | Yes | |
| total | Yes | |
| offset | Yes | |
| trains | Yes | |
| hasMore | Yes | |
| returned | Yes | |
| nextOffset | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, non-destructive behavior, so the description adds value with non-trivial behavioral detail: filters are applied before pagination and only direct services are returned. No contradiction with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences contain the prerequisite, core scope, required input, and filter/pagination behavior with no filler. The most important usage constraint is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is nearly complete for a read-only search tool: it covers prerequisites, scope, required date, optional filters, and filter-pagination ordering, while the output schema covers return details. It could be slightly stronger by naming the sibling for transfer journeys.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema description coverage at only 22%, the description must compensate. It groups optional filters into 'time, service, and operator' and notes they apply before pagination, but it does not map them to departureAfter/departureBefore, serviceTypes, and operators or explain their value semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Searches direct Shinkansen services only, never transfer journeys.' This clearly identifies the tool's scope and semantically differentiates it from transfer-search siblings such as search_journeys.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit sequencing ('Use after resolving both station IDs') and a clear exclusion ('never transfer journeys'), plus a required date. It does not name an alternative tool for transfer searches, so it falls just short of fully explicit sibling routing.
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.
7 tool updates
v0.1.0- First observed
compare_trains - First observed
get_availability - First observed
get_provider_status - First observed
get_train_details - First observed
search_journeys - First observed
search_stations - First observed
search_trains
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: provider status, station search, direct train search, journey search with transfers, train details, availability check, and comparison. No two tools overlap in function; even search_trains and search_journeys are explicitly separated by transfer handling.
All tool names follow a consistent verb_noun pattern (get_, search_, compare_) with snake_case throughout. The naming is predictable and aligns with the domain verbs expected (get, search, compare).
With 7 tools, the server is well-scoped for a read-only Japan rail information service. Each tool covers a distinct aspect of the domain without unnecessary duplication, fitting the typical 3-15 tool range perfectly.
The tool surface covers the core journey: station lookup, train search (direct and transfers), train details, availability, and comparison. Minor gaps exist like a dedicated fare breakdown or station details, but the essential read-only workflow is fully supported.
Maintenance
Related MCP Connectors
Deep, obscure Japanese station, accessibility & hazard data for AI agents. English-first.
Read-only public transit departures, stop search, and city coverage for bus and train users.
- potto-japanOAuthapp.potto
Authoritative JLPT-graded Japanese dataset (kanji, vocab, grammar, history) via MCP and REST.
Read-only index to Japanese election data, official sources, relations and scoped search history.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time Dutch Railways (NS) data for journey planning, live departures, disruptions, and station search.3-
- AlicenseBqualityDmaintenanceEnables route planning and transit information retrieval for Japan using the public Transit API. Supports searching stations, planning routes, and checking departures.101MIT
- FlicenseNot gradedqualityCmaintenanceProvides live UK rail data including station search, departures, arrivals, service details, and pre-filled Trainline booking links.-
- AlicenseAqualityCmaintenanceEnables AI assistants to answer questions about Japan's railway network with accurate track-connection data, including station neighbors and local subgraphs for all 9,043 stations nationwide.2MIT