Skip to main content
Glama

japan-rail-mcp

japan-rail-mcp es un servidor de solo lectura del Model Context Protocol para datos estructurados del ferrocarril japonés. La versión 0.1 es deliberadamente centrada en el Shinkansen: proporciona un catálogo de estaciones útil sin credenciales y puede consultar horarios en vivo del Shinkansen, tarifas, clases de asiento y paradas mediante una clave del Standard Plan de la API de Ekispert del propietario del despliegue.

El servidor nunca reserva billetes, inicia sesión en cuentas de ferrocarril, elude controles de acceso, extrae datos de sitios web de operadores ni presenta fixtures de prueba como datos en vivo.

japan-rail-mcp está diseñado para compartir una interfaz conceptual común con china-rail-mcp, con el objetivo a largo plazo de establecer esquemas interoperables para servidores MCP de ferrocarril entre países.

Esto es una convención experimental de interoperabilidad, no un estándar oficial ferroviario ni de MCP.

Características

Capacidad

Sin clave de API

Con EKISPERT_API_KEY

Búsqueda de estaciones en japonés, inglés y romanización

Sí, catálogo incluido de 58 estaciones centrado en el Shinkansen

Sí

Candidatos de estación ambiguos

Sí

Sí

Búsqueda directa de horarios de Shinkansen

Explícitamente no compatible

Sí, sujeto al plan de la clave

Importes de tarifa en JPY numérico

Explícitamente no compatible

Sí

Normalización de clases de asiento

Explícitamente no compatible

Sí

Paradas de tren ordenadas

Explícitamente no compatible

Sí

Inventario de reservas / disponibilidad de asientos

Explícitamente no compatible

Explícitamente no compatible

Búsqueda de viajes con transbordos

Explícitamente no compatible en v0.1

Explícitamente no compatible en v0.1

Todos los datos correctos incluyen la procedencia de origen. Los sellos de hora del ferrocarril son valores ISO 8601 explícitos con el desfase de Japón, por ejemplo 2026-08-26T12:03:00+09:00. Las fechas relativas como “mañana” deben ser resueltas por el cliente MCP; el servidor requiere YYYY-MM-DD.

Related MCP server: japan-transit-mcp

Herramientas MCP

Herramienta

Cuándo utilizarla

get_provider_status

Comprobar proveedores configurados y límites de capacidad antes de una consulta en vivo.

search_stations

Resolver un nombre a uno o más ID canónicos jp:station:*. Usar antes de la búsqueda de trenes.

search_trains

Buscar servicios directos de Shinkansen entre dos ID de estación resueltos.

get_train_details

Leer las paradas ordenadas de un trainId opaco devuelto por search_trains.

get_availability

Comprobar el soporte del proveedor; actualmente devuelve status: "unsupported" sin recuentos inventados.

compare_trains

Ordenar los mismos candidatos estructurados de tren directo sin una recomendación subjetiva.

search_journeys

Reservado para rutas con transbordos; devuelve un error estructurado de no soporte en v0.1.

Cada herramienta está anotada como de solo lectura, no destructiva e idempotente. Cada resultado correcto de la herramienta incluye tanto texto legible JSON por humanos como structuredContent de MCP validado contra un esquema de datos.

Instalación

Requisitos: Node.js 22 o superior. El CI usa Node.js 24 LTS.

git clone https://github.com/TakeruF/japan-rail-mcp.git
cd japan-rail-mcp
npm install
npm run build

Inicie el servidor stdio:

npm start

Después de una publicación en npm, los clientes pueden iniciarlo alternativamente con:

npx -y japan-rail-mcp

Datos en vivo del Shinkansen

La funcionalidad de horarios en vivo requiere una clave de acceso cuyo acuerdo de API de Ekispert incluya el endpoint de búsqueda de rutas del Standard Plan. El plan gratuito no proporciona ese endpoint clave.

export EKISPERT_API_KEY='your-own-key'
npm start

La clave se envía solo al endpoint configurado de la API de Ekispert. Nunca se devuelve en los resultados de las herramientas ni se incluye en los errores de proveedor. El proyecto no incluye una clave compartida, no ofrece sublicencias de los datos del proveedor, ni anula los límites de solicitudes asociados a tu acuerdo.

Configuración del cliente

Claude Desktop

Para una copia local del repositorio, añade una entrada como esta y sustituye la ruta absoluta:

{
  "mcpServers": {
    "japan-rail": {
      "command": "node",
      "args": ["/absolute/path/to/japan-rail-mcp/dist/index.js"],
      "env": {
        "EKISPERT_API_KEY": "your-own-key"
      }
    }
  }
}

Omite el objeto env si solo necesitas la búsqueda de estaciones. Prefiere el gestor de secretos de tu cliente en lugar de guardar claves en un repositorio de configuración.

Codex

Registra el comando stdio compilado con la configuración MCP de Codex, o usa el formato CLI que admita tu versión instalada de Codex:

codex mcp add japan-rail -- node /absolute/path/to/japan-rail-mcp/dist/index.js

Proporciona EKISPERT_API_KEY a través del entorno del proceso o de la configuración de secretos de Codex cuando se requieran datos en vivo de los trenes.

Ejemplos de herramientas

Primero, resuelve los candidatos de estación:

{
  "query": "Osaka"
}

El resultado incluye deliberadamente tanto Osaka como Shin-Osaka cuando sea pertinente. Después usa los ID exactos:

{
  "fromStationId": "jp:station:tokyo",
  "toStationId": "jp:station:shin-osaka",
  "date": "2026-08-26",
  "departureAfter": "12:00",
  "serviceTypes": ["shinkansen"],
  "limit": 10,
  "offset": 0
}

Una tarifa normalizada es numérica y segura para monedas:

{
  "amount": 14720,
  "currency": "JPY",
  "formatted": "¥14,720",
  "kind": "total"
}

formatted es solo para mostrar; los clientes deben usar amount y currency para comparar.

Fuentes de datos

Catálogo de estaciones incluidas

El catálogo mantenido por el proyecto cubre 58 estaciones de alto valor: las redes Shinkansen actuales más un pequeño conjunto de estaciones comparativas deliberadamente ambiciosas, como descartes, estaciones de la zona de Shinjuku y Fukuoka en Toyama. Solo contiene metadatos de estación—sin datos de horarios, tarifas ni disponibilidad. Los mapas de rutas del operador y las páginas web de viajes se incluyen en la evaluación de fuentes.

API de Ekispert

El proveedor opcional usa endpoints documentados y una clave de acceso del propietario del despliegue. Solicita fechas explícitas, una medianoche explícita cuando no se proporciona un límite de hora inferior, paradas, tipos de asiento y detalles del operador. Las respuestas identifican ekispert-standard, el conjunto de datos del endpoint, el tiempo de recuperación, el estado en tiempo real y el límite del acuerdo del proveedor.

Fuentes no utilizadas para la base de Step

El conjunto de datos de horarios de ODPT JR East actual excluye explícitamente el Shinkansen. GTFS-JP v4 es una especificación de datos, no una fuente nacional de datos ni una licencia de datos general. Las páginas públicas de horarios y los PDF de JR no proporcionan al proyecto una API de propósito general ni una autorización de redistribución, por lo que no se analizan ni se incluyen.

Consulta docs/data-sources.md para la evaluación con fecha y los enlaces originales.

Arquitectura

MCP tools
  -> RailService
    -> StationCatalogProvider
       -> StaticShinkansenStationProvider
    -> RailDataProvider
       -> EkispertProvider (optional key)

core rail schemas
  + Japan extensions
  + provider-private parsing and identifiers

Los manejadores de MCP valigan y describen las llamadas a las herramientas pero no obtienen ni parsean datos del proveedor. Las comprobaciones de capacidad fallan de manera cerrada antes del acceso a la red. search_trains representa una tren físico directo; search_journeys representa un itinerario que puede contener transbordos. Consulta docs/architecture.md para conocer el límite de extracción.

Relación con china-rail-m

Los nombres de herramientas compartidos:

  • search_stations

  • search_trains

  • get_train_details

  • get_availability

  • compare_trains

Los esquemas de datos candidatos comunes son Station, StationRef, Train, Journey, Fare, SeatClass, SeatAvailability, Source, RailError y RailProviderCapabilities. El contrato mantiene tarifas numéricas ISO 4217, desfases horarios locales explícitos, la procedencia, los ID de estación normales, las comprobaciones de capacidades del proveedor y los errores estructurados.

Los detalles específicos de Japón viven en extensions.japan, incluyendo:

  • Líneas y nombres de servicios del Shinkansen

  • Nombres de estaciones del proveedor

  • Números de tren visibles para los pasajeros frente a identificadores operativos/de proveedor

  • Etiquetas japonesas de asiento como 自由席, 指定席, グリーン車 y グランクラス

Estos límites son candidatos para un futuro rail-mcp-spec independiente; este repositorio no afirma que such standardzo ya existe.

Limitaciones

  • Una instalación sin credenciales solo deja buscar estaciones.

  • El comportamiento en vivo de los vagones tiene pruebas de contrato con datos de prueba, pero no se ha validado con una cuenta real en este repositorio. Una prueba de fixture exitosa no es prueba móvil de acceso al proveedor de producción.

  • El acceso al Standard Plan, los límites, la presentación permitida, el uso comercial, las cachés y los derechos de redistribución dependen del acuerdo del propietario del despliegue.

  • Los resultados de búsqueda se limitan a las primeras 20 respuestas del proveedor por solicitud.

  • search_trains solo devuelve rutas directas de Shinkansen. Los transbordos no se ocultan.

  • Las clases de asiento y las tarifas publicadas no son inventario de asientos. get_availability sigue sin ser compatible.

  • Las interrupciones de servicio y las posiciones de trenes en tiempo real no están incluradas.

  • El catálogo de estaciones es centrado en el Shinkansen, no es una base de datos nacional completa.

  • Es necesario revisar con el operador ferroviario o un canal de reserva autorizado las condiciones, tarifas y billetes importantes.

Desarrollo

npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run format

Las pruebas cubren coincidencia de estaciones en japonés/inglés, ambigüedad, análise de la fondo de Tokyo-Shin-Osaka, fechas explícitas y límites de la zona horaria de Tokio, fallos del proveedor, no disposición de disponibilidad, mismo resultado estructurado de MCP, anotaciones de solo lectura y un contrato compartido de rawaya reusable.

Seguridad y alcance de solo lectura

No hay herramientas de compra de billetes, reservas, inicio de sesión, payment, CAPTCHA, cuenta o mutación. Consulta SECURITY.md para conocer las recomendaciones de gestión de credenciales.

Licencia

El código fuente del proyecto se ofrece bajo la Licencia MIT. Esa licencia se aplica al código de este espacio; no tiene re­licencia ninguna de los datos del operador ferroviario, respuestas de Ekispert, conjuntos de datos ODPT, feeds OP, ni marcas comerciales de terceros. Cada fuente de datos sigue sujeta a sus propios términos.

Available Tools

7 tools
compare_trainsCompare direct Shinkansen trainsB
Read-onlyIdempotent

Use to sort structured direct-train candidates by departure, arrival, duration, or total fare. This tool does not make a subjective recommendation.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
limitNo
offsetNo
sortByNodeparture_time
operatorsNo
toStationIdYesCanonical ID returned by search_stations.
serviceTypesNo
fromStationIdYesCanonical ID returned by search_stations.
departureAfterNo
departureBeforeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
limitYes
totalYes
offsetYes
trainsYes
hasMoreYes
returnedYes
nextOffsetYes

TDQS

B3.2/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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 availabilityA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
trainIdYes
toStationIdYesCanonical ID returned by search_stations.
fromStationIdYesCanonical ID returned by search_stations.

Output Schema

ParametersJSON Schema
NameRequiredDescription
seatsNo
reasonNo
sourceNo
statusYes
retrievedAtYes

TDQS

A4.1/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 statusA
Read-onlyIdempotent

Use before live train queries to see which read-only capabilities are configured and why unavailable capabilities are disabled.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
notesYes
providerYes
configuredYes
capabilitiesYes

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 detailsA
Read-onlyIdempotent

Use with the opaque trainId returned by search_trains to retrieve that service and its ordered stops. Do not construct train IDs manually.

ParametersJSON Schema
NameRequiredDescriptionDefault
trainIdYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
stopsYes
trainYes
sourceYes

TDQS

A4.3/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 journeysA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
operatorsNo
toStationIdYesCanonical ID returned by search_stations.
serviceTypesNo
fromStationIdYesCanonical ID returned by search_stations.
departureAfterNo
departureBeforeNo
includeNonShinkansenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
journeysYes

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 stationsA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
stationsYes

TDQS

A4.1/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 trainsA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
limitNo
offsetNo
operatorsNo
toStationIdYesCanonical ID returned by search_stations.
serviceTypesNo
fromStationIdYesCanonical ID returned by search_stations.
departureAfterNo
departureBeforeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
limitYes
totalYes
offsetYes
trainsYes
hasMoreYes
returnedYes
nextOffsetYes

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

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: '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.

Usage Guidelines4/5

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.

  1. 7 tool updatesv0.1.0
    • First observedcompare_trains
    • First observedget_availability
    • First observedget_provider_status
    • First observedget_train_details
    • First observedsearch_journeys
    • First observedsearch_stations
    • First observedsearch_trains

TDQS

A4/5.0

Scored across 7 tools

Disambiguation5/5

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.

Naming Consistency5/5

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).

Tool Count5/5

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.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers