japan-rail-mcp
japan-rail-mcp
japan-rail-mcp는 구조화된 일본 철도 데이터를 위한 읽기 전용 Model Context Protocol 서버입니다. 버전 0.1은 의도적으로 **신칸센 우선(Shinkansen-first)**입니다. 즉, 자격 증명 없이 쓸 수 있는 역 카탈로그를 제공하며, 배포 소유자의 Ekispert API Standard Plan 키를 통해 실시간 신칸센 시간표, 요금, 좌석 등급, 정차역을 조회할 수 있습니다.
이 서버는 티켓을 예매하거나 철도 계정에 로그인하지 않으며, 접근 제어를 우회하지 않고, 운영사 웹사이트를 스크래핑하지 않으며, 테스트 픽스처를 실시간 데이터로 제시하지 않습니다.
japan-rail-mcp는 china-rail-mcp와 공통된 개념적 인터페이스를 공유하도록 설계되었으며, 장기적으로는 국가 간 철도 MCP 서버들의 상호운용 가능한 스키마를 확립하는 것을 목표로 합니다.
이것은 실험적 상호운용성 협약이며, 공식 철도 표준이나 MCP 표준이 아닙니다.
주요 기능
기능 | API 키 없이 |
|
일본어·영어·로마자 역 검색 | 지원, 동봉된 신칸센 중심 58개 역 카탈로그 사용 | 지원 |
모호한 역 후보 안내 | 지원 | 지원 |
신칸센 직행 시간표 검색 | 명시적으로 미지원 | 지원됨, 키가 포함된 요금제에 따름 |
숫자 JPY 요금 조회 | 명시적으로 미지원 | 지원 |
좌석 등급 정규화 | 명시적으로 미지원 | 지원 |
정차역 순서 목록 | 명시적으로 미지원 | 지원 |
예약 재고 / 좌석 가능 여부 | 명시적으로 미지원 | 명시적으로 미지원 |
환승 포함 여정 검색 | v0.1에서 명시적으로 미지원 | v0.1에서 명시적으로 미지원 |
All successful data includes 출처(provenance). 철도 시간 표시는 일본 오프셋이 포함된 명시적 ISO 8601 값입니다(예: 2026-08-26T12:03:00+09:00). “내일”과 같은 상대 날짜는 클라이언트에서 결정해야 합니다. 서버는 YYYY-MM-DD 형식을 요구합니다.
Related MCP server: japan-transit-mcp
MCP 도구
도구 | 사용 시점 |
| 라이브 조회 전에 구성된 공급자와 기능 경계를 확인합니다. |
| 이름을 하나 이상의 정규 |
| 두 개의 확인된 역 ID 사이의 신칸센 직선 운행편을 검색합니다. |
|
|
| 공급자 지원 여부를 확인합니다. 현재 |
| 주관적 추천 없이 동일한 구조화된 직선 열차 후보들을 정렬합니다. |
| 환승 경로용으로 예약되어 있으며 v0.1에서는 구조화된 미지원 오류를 반환합니다. |
모든 도구는 읽기 전용이며, 비파괴적이고, 멱등(idempotent)입니다. 성공적인 도구 결과에는 사람이 읽을 수 있는 JSON 텍스트와 출력 스키마로 검증된 MCP structuredContent가 모두 포함됩니다.
설치
요구 사항: Node.js 22 이상. CI는 Node.js 24 LTS를 사용합니다.
git clone https://github.com/TakeruF/japan-rail-mcp.git
cd japan-rail-mcp
npm install
npm run buildstdio 서버를 시작합니다:
npm startnpm 배포 후에는 클라이언트가 다음 형태로도 실행할 수 있습니다:
npx -y japan-rail-mcp신칸센 실시간 데이터
실시간 시간표 기능은 Ekispert API 계약에 Standard Plan 경로 검색 엔드포인트가 포함된 액세스 키가 있어야 합니다. 무료 요금제에서는 이 핵심 엔드포인트를 제공하지 않습니다.
export EKISPERT_API_KEY='your-own-key'
npm start키는 설정된 Ekispert API 엔드포인트로만 전송됩니다. 도구 결과나 공급자 오류에는 절대 포함되지 않습니다. 이 프로젝트에는 공용 키가 없으며, 공급자 데이터를 재라이선스하지 않고, 계약에 명시된 요청 한도를 변경하지 않습니다.
Claude Desktop
로컬 체크아웃을 사용하는 경우 다음 항목을 추가하고 절대 경로를 교체하세요:
{
"mcpServers": {
"japan-rail": {
"command": "node",
"args": ["/absolute/path/to/japan-rail-mcp/dist/index.js"],
"env": {
"EKISPERT_API_KEY": "your-own-key"
}
}
}
}Stations 검색 전용인 경우에는 env 객체를 생략하세요. 키를 설정 저장소에 커밋하기보다 클라이언트의 비밀 관리 기능을 우선 사용하는 것이 좋습니다.
Codex
빌드된 stdio 명령을 Codex의 MCP 설정에 등록하거나 설치된 Codex 버전에서 지원하는 CLI 형식을 사용하세요:
codex mcp add japan-rail -- node /absolute/path/to/japan-rail-mcp/dist/index.js실시간 열차 데이터가 필요하면 EKISPERT_API_KEY를 프로세스 환경이나 Codex의 비밀 설정을 통해 제공하세요.
도구 사용 예시
먼저 역 후보를 확인합니다:
{
"query": "Osaka"
}결과에는 관련이 있을 때 오사카와 신오사카가 모두 포함됩니다. 그다음 정확한 ID를 사용하세요:
{
"fromStationId": "jp:station:tokyo",
"toStationId": "jp:station:shin-osaka",
"date": "2026-08-26",
"departureAfter": "12:00",
"serviceTypes": ["shinkansen"],
"limit": 10,
"offset": 0
}정규화된 요금(수치는 화폐 단위로 안전합니다):
{
"amount": 14720,
"currency": "JPY",
"formatted": "¥14,720",
"kind": "total"
}formatted는 표시 전용입니다. 비교를 하려면 amount와 currency를 사용해야 합니다.
데이터 소스
동봉 역 카탈로그
프로젝트가 관리하는 카탈로그에는 58개의 중요 역이 포함되어 있습니다: 현재 신칸센 노선과 의도적으로 혼동될 수 있는 비교용 역 몇 곳(오사카, 신주쿠 역 일대, 도야마의 후쿠오카)으로 구성됩니다. 여기에는 역 메타데이터만 들어 있고 시간표, 요금, 좌석 정보는 없습니다. 운영사 노선도와 여행 페이지는 출처 평가 문서에 링크되어 있습니다.
Ekispert API
선택 제공자는 문서화된 엔드포인트와 배포 소유자의 액세스 키를 사용합니다. 요청 시 명시적 날짜, 하한 시각이 제공되지 않은 경우 명시적 자정(00:00), 정차역, 좌석 유형, 사업자 세부 정보를 요청합니다. 응답에는 ekispert-standard, 엔드포인트 데이터셋, 조회 시각, 실시간 상태, 공급자 계약 경계가 표시됩니다.
신칸센 시간표 데이터에 사용하지 않는 출처
현재 ODPT JR East 열차 시간표 데이터셋은 신칸센을 명시적으로 제외합니다.
GTFS-JP v4는 데이터 스펙이지 전국 피드나 일괄적 데이터 라이선스가 아닙니다.
JR 공개 시간표 페이지와 PDF는 이 프로젝트에 범용 API나 재배포 권한을 제공하지 않으므로 스크래핑에 사용하지 않거나 동봉하지 않습니다.
날짜된 평가와 주요 링크는 docs/data-sources.md를 참조하세요.
아키텍처
MCP tools
-> RailService
-> StationCatalogProvider
-> StaticShinkansenStationProvider
-> RailDataProvider
-> EkispertProvider (optional key)
core rail schemas
+ Japan extensions
+ provider-private parsing and identifiersMCP 핸들러는 도구 호출을 검증하고 설명하지만 공급자 데이터를 가져오거나 파싱하지 않습니다. 기능 확인은 네트워크 접근 전에 fail-closed 방식으로 수행됩니다. search_trains는 물리적인 직선 열차를 나타내고, search_journeys는 환승이 포함될 수 있는 전체 여정을 나타냅니다. 격리 경계에 대한 설명은 docs/architecture.md를 참조하세요.
china-rail-mcp와의 관계
공통으로 쓰이는 도구 이름:
search_stationssearch_trainsget_train_detailsget_availabilitycompare_trains
공통 후보 스키 마는 Station, StationRef, Train, Journey, Fare, SeatClass, SeatAvailability, Source, RailError, RailProviderCapabilities입니다. 계약은 숫자 단위의 ISO 4217 요금, 국가별 로컬 시차가 명시된 시간, 출처, 정규 역 ID, 공급자 기능 확인, 구조화된 오류를 모두 보존합니다.
일본 특유의 항목은 extensions.japan 아래 있으며, 다음을 포함합니다:
신칸센 노선 및 서비스 이름
공급자가 표기하는 역명
승객 대상 열차 번호와 운영 / 제공자 식별자 구분
自由席,指定席,グリーン車,グランクラス같은 일본 좌석 라벨
이러한 경계는 미래의 rail-mcp-spec 후보입니다. 지금 이미 존재하는 표준이라고 주장하지는 않습니다.
제한 사항
자격 증명 없이 설치하면 역에서 역 검색만 됩니다.
실시간 열차 동작은 픽스처 기반 계약 시험만 존재하며, 본 저장소에서 실제 계정으로 수행되지는 않았습니다. 테스트 픽스 처 가 통과해도 프로덕션 공급자 접근을 보증하지 않습니다.
Ekispert Standard Plan의 한도, 결과 표현 방식, 상업적 이용, 캐싱, 재배포 권한은 모두 배포 소유자의 계약에 따라 차이가 있습니다.
검색 결과는 요청당 제공자의 첫 20개 응답으로 제한됩니다.
search_trains는 직행 신칸센 노선만 반환하며, 환승 구간을 억지로직행으로 변환하지 않습니다.좌석 등급과 게시 요금은 좌석 재고가 아닙니다.
get_availability는 여전히 미지원 상태입니다지연 운행과 실시간 열차 위치는 제공되지 않습니다.
포함된 역 카탈로그는 신간센 중심이라 전국 역이라기보다는 특화되어 있습니다.
중요한 여행 정보, 요금, 티켓 조건은 철도 운영사나 공식 예약 채널을 통해 확인 해야 합니다.
개발
npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run format테스트는 일본어/영어 역명 매칭, 명칭 혼돈 가능성, 도쿄–신타오사카 픽스처 파싱, 명시 날짜 및 도쿄 시간대 경계, 공급자 오류, 미지원 가용성, MCP 구조적 출력, 읽기 전용 주석, 공용 철도 스키마 계약을 다룹니다.
보안 및 읽기 전용 범위
티켓 구매, 예약, 로그인, 결제, CAPTCHA, 계정, 데이터 변환과 같은 도구는 없습니다. 자격 증명 처리 지침은 SECURITY.md를 참고하세요.
라이선스
프로젝트 소스 코드는 MIT 라이선스로 제공됩니다. 이 라이선스는 이 저장소 코드에 적용되며, 철도 운영사 데이터, Ekispert 응답, ODPT 데이터셋, 는 GTFS 피드, 제3자 상표를 재라이선스하지 않습니다. 각 데이터 소스는 고유의 이용 약관을 따릅니다. - Relay을 반환한다:
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