Skip to main content
Glama

japan-rail-mcp

japan-rail-mcp is a read-only Model Context Protocol server for structured Japanese railway data. Version 0.1 is deliberately Shinkansen-first: it provides a useful credential-free station catalog and can query live Shinkansen timetables, fares, seat classes, and stops through a deployment owner's Ekispert API Standard Plan key.

The server never books tickets, signs in to railway accounts, bypasses access controls, scrapes operator websites, or presents test fixtures as live data.

japan-rail-mcp is designed to share a common conceptual interface with china-rail-mcp, with the long-term goal of establishing interoperable schemas for railway MCP servers across countries.

This is an experimental interoperability convention, not an official railway or MCP standard.

Features

Capability

Without an API key

With EKISPERT_API_KEY

Japanese, English, and romanized station search

Yes, bundled 58-station Shinkansen-focused catalog

Yes

Ambiguous station candidates

Yes

Yes

Direct Shinkansen timetable search

Explicitly unsupported

Yes, subject to the key's plan

Fare amounts in numeric JPY

Explicitly unsupported

Yes

Seat-class normalization

Explicitly unsupported

Yes

Ordered train stops

Explicitly unsupported

Yes

Reservation inventory / seat availability

Explicitly unsupported

Explicitly unsupported

Transfer journey search

Explicitly unsupported in v0.1

Explicitly unsupported in v0.1

All successful data includes source provenance. Railway timestamps are explicit ISO 8601 values with the Japan offset, for example 2026-08-26T12:03:00+09:00. Relative dates such as “tomorrow” must be resolved by the MCP client; the server requires YYYY-MM-DD.

Related MCP server: japan-transit-mcp

MCP tools

Tool

When to use it

get_provider_status

Check configured providers and capability boundaries before a live query.

search_stations

Resolve a name to one or more canonical jp:station:* IDs. Use before train search.

search_trains

Search direct Shinkansen services between two resolved station IDs.

get_train_details

Read the ordered stops for an opaque trainId returned by search_trains.

get_availability

Check provider support; currently returns status: "unsupported" without invented counts.

compare_trains

Sort the same structured direct-train candidates without a subjective recommendation.

search_journeys

Reserved for transfer routes; returns a structured unsupported error in v0.1.

Every tool is annotated read-only, non-destructive, and idempotent. Every successful tool result includes both human-readable JSON text and MCP structuredContent validated against an output schema.

Installation

Requirements: Node.js 22 or newer. CI uses Node.js 24 LTS.

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

Start the stdio server:

npm start

After an npm release, clients can alternatively launch it with:

npx -y japan-rail-mcp

Live Shinkansen data

Live timetable functionality requires an access key whose Ekispert API agreement includes the Standard Plan route-search endpoint. The free plan does not provide that core endpoint.

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

The key is sent only to the configured Ekispert API endpoint. It is never returned in tool results or included in provider errors. The project does not include a shared key, sublicense provider data, or override the request limits attached to your agreement.

Client configuration

Claude Desktop

For a local checkout, add an entry like this and replace the absolute path:

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

Omit the env object for station search only. Prefer your client's secret-management facility over committing keys to a configuration repository.

Codex

Register the built stdio command with Codex's MCP configuration, or use the CLI form supported by your installed Codex version:

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

Provide EKISPERT_API_KEY through the process environment or Codex's secret configuration when live train data is required.

Tool examples

First resolve station candidates:

{
  "query": "Osaka"
}

The result deliberately includes both Osaka and Shin-Osaka when relevant. Then use the exact IDs:

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

A normalized fare is numeric and currency-safe:

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

formatted is display-only; clients should use amount and currency for comparison.

Data sources

Bundled station catalog

The project-maintained catalog covers 58 high-value stations: current Shinkansen networks plus a small set of deliberately ambiguous comparison stations such as Osaka, Shinjuku-area stations, and Fukuoka in Toyama. It contains station metadata only—no timetable, fare, or availability data. Operator route maps and travel pages are linked in the source assessment.

Ekispert API

The optional provider uses documented endpoints and a deployment owner's access key. It requests explicit dates, an explicit midnight when no lower time bound is supplied, stops, seat types, and operator details. Responses identify ekispert-standard, the endpoint dataset, retrieval time, realtime status, and the provider-agreement boundary.

Sources not used for Shinkansen timetable data

  • The current ODPT JR East train-timetable dataset explicitly excludes Shinkansen.

  • GTFS-JP v4 is a data specification, not a nationwide feed or a blanket data license.

  • Public JR timetable pages and PDFs do not provide the project with a general-purpose API or a redistribution grant, so they are not scraped or bundled.

See docs/data-sources.md for the dated assessment and primary links.

Architecture

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

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

MCP handlers validate and describe tool calls but do not fetch or parse provider data. Capability checks fail closed before network access. search_trains represents a direct physical train; search_journeys represents an itinerary that may contain transfers. See docs/architecture.md for the extraction boundary.

Relation to china-rail-mcp

The shared tool names are:

  • search_stations

  • search_trains

  • get_train_details

  • get_availability

  • compare_trains

The common candidate schemas are Station, StationRef, Train, Journey, Fare, SeatClass, SeatAvailability, Source, RailError, and RailProviderCapabilities. The contract keeps numeric ISO 4217 fares, explicit country-local time offsets, provenance, canonical station IDs, provider capability checks, and structured errors.

Japan-specific details live under extensions.japan, including:

  • Shinkansen lines and service names

  • provider station names

  • passenger-facing train numbers versus operational/provider identifiers

  • Japanese seat labels such as 自由席, 指定席, グリーン車, and グランクラス

These boundaries are candidates for a future independent rail-mcp-spec; this repository does not claim that such a standard already exists.

Limitations

  • A credential-free install searches stations only.

  • Live train behavior has fixture-backed contract tests but has not been validated with a real account in this repository. A successful test fixture is not proof of production provider access.

  • The Ekispert Standard Plan, limits, allowed presentation, commercial use, caching, and redistribution rights depend on the deployment owner's agreement.

  • Search results are limited to the provider's first 20 answers per request.

  • search_trains returns only direct Shinkansen routes. Transfers are not silently flattened.

  • Seat classes and published fares are not seat inventory. get_availability remains unsupported.

  • Service disruptions and realtime train positions are not included.

  • The bundled station catalog is Shinkansen-focused, not a complete national station database.

  • Important travel, fare, and ticket conditions must be checked with the railway operator or an authorized booking channel.

Development

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

Tests cover Japanese/English station matching, ambiguity, Tokyo–Shin-Osaka fixture parsing, explicit dates and Tokyo timezone boundaries, provider failures, unsupported availability, MCP structured output, read-only annotations, and a reusable shared rail schema contract.

Security and read-only scope

There are no ticket purchase, reservation, login, payment, CAPTCHA, account, or mutation tools. See SECURITY.md for credential-handling guidance.

License

Project source code is available under the MIT License. That license applies to this repository's code; it does not relicense railway-operator data, Ekispert responses, ODPT datasets, GTFS feeds, or third-party trademarks. Each data source remains subject to its own terms.

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers