Skip to main content
Glama
tokyo-transit-mcp
by loosephoto

Search Route

search_route
Read-onlyIdempotent

Find transit routes between two stations in Tokyo, with weather and service-disruption checks plus AI-ready travel advice. Specify language to get responses in Japanese, English, or Chinese.

Instructions

乗り換えルート検索 - 出発駅から到着駅までのルートを検索。日本語・英語・中国語自動識別、天候/高温/運休を検出し、LLM向けの留意(ai_transit_advice)を返す。language(ja/en/zh)を指定すると応答言語を強制(ユーザーのクエリ言語に合わせて指定推奨)。荒天・降雪・凍結時を除き、到着地点周辺のレンタサイクル案内を表示。user_location(緯度経度)指定時は運転見合わせ時の代替シェアサイクル案内を現在地基準で表示。

【出力指示/OUTPUT RULE】ツールの content には「表示済みの完成テキスト」が既に日本語・英語・中国語のどれかで含まれている。この content をそのままユーザーへ提示すること。要約・再構成・言い換え・省略・見出しの書き換えを一切しないこと。特に運転見合わせ・特別警報・緊急避難・振替輸送・シェアサイクル代替(emergency_alert / cycling_alternative / bus_transfer_alternative / suspended_lines)など運行障害時の安全情報は、原文のまま必ずすべて表示すること。

【留意の扱い/NOTE HANDLING】【留意】(英語は [Note])で始まる行と ai_transit_advice フィールドは、利用者向けの完成文ではなく、回答を組むための留意メモである。そのまま貼り付けず、内容を踏まえて自分の言葉で回答に織り込むこと。安全・危険・避難・振替輸送・代替手段に関する指示は省略しない。追加の説明は content の後に補足として付け加えてもよい。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "search_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes到着駅名
fromYes出発駅名
languageNo応答言語の強制指定(省略時は駅名から自動判定)。ユーザーが英語で質問した場合は en、中国語なら zh を指定すると確実にその言語で応答。
user_locationNoユーザーの現在位置(緯度経度)。運転見合わせ時のシェアサイクル案内を現在地基準で表示する場合に指定。例: {"lat": 35.681, "lon": 139.767}

Output Schema

NameRequiredDescriptionDefault
statusYesSUCCESS / NO_DATA / ERROR など
messageNo
detected_languageNoja / en / zh

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.58.27
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "detected_language": {
      +      "description": "ja / en / zh",
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "SUCCESS / NO_DATA / ERROR など",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changedv2.58.7
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "応答言語の強制指定(省略時は駅名から自動判定)。ユーザーが英語で質問した場合は en、中国語なら zh を指定すると確実にその言語で応答。",
      +  "enum": [
      +    "ja",
      +    "en",
      +    "zh"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / user_location
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "ユーザーの現在位置(緯度経度)。運転見合わせ時のシェアサイクル案内を現在地基準で表示する場合に指定。例: {\"lat\": 35.681, \"lon\": 139.767}",
      +  "properties": {
      +    "lat": {
      +      "maximum": 90,
      +      "minimum": -90,
      +      "type": "number"
      +    },
      +    "lon": {
      +      "maximum": 180,
      +      "minimum": -180,
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "lat",
      +    "lon"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/openWorld/idempotent/non-destructive, and the description goes well beyond them: it discloses automatic language detection, weather/heat/service-suspension detection, the presence of safety fields (emergency_alert, cycling_alternative, bus_transfer_alternative, suspended_lines), the condition under which cycling suggestions appear or are withheld, and precise rules for presenting the returned content. This is materially more behavioral context than the annotations carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the remaining guidance is organized under explicit labels (【出力指示/OUTPUT RULE】, 【留意の扱い/NOTE HANDLING】) rather than free-form prose. Some redundancy is deliberate — the synonym list 要約・再構成・言い換え・省略 and the repeated 'do not omit safety information' are emphasis, not filler — though the block is long for a four-parameter tool.

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?

Given a nested object parameter, an output schema, and multi-language behavior, the description covers what an agent needs: inputs, language forcing, disruption/safety output fields, and how to handle the returned content versus the note field. Return-value structure is appropriately left to the existing output schema rather than duplicated.

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?

Schema description coverage is 100%, so the schema already documents from, to, language, and user_location (including the lat/lon example), and the description largely restates those meanings. The only marginal addition is the recommendation to set language to match the user's query language and the weather-related context for user_location, which the schema already conveys. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a concrete verb and resource ('乗り換えルート検索 - 出発駅から到着駅までのルートを検索') and adds scope details: language auto-detection across ja/en/zh, weather/heat/suspension detection, and an ai_transit_advice output. It is clear what the tool returns, but it never distinguishes itself from siblings like search_bus, search_ferry, or get_timetable, so the agent must infer that this is the general rail/transit routing tool.

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?

Conditional guidance exists for individual parameters (set language to match the user's query language; supply user_location to get current-location-based shared-bike alternatives), and it states cycling guidance is suppressed in bad weather. However, there is no explicit when-to-use-this-vs-another-tool guidance and no stated exclusions relative to the bus/ferry/flight search siblings, so routing between tools is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.