Skip to main content
Glama

Plan a public transport trip in Hong Kong

plan_trip
Read-only

Routes between two places in Hong Kong by MTR, bus, minibus, tram and ferry, best first: departure and arrival times, every walk and ride with stops, Octopus fares for the group, live next departures, traffic delays, and a link to open the trip on a live map. Also lists Klook things to do near the destination (affiliate ads).

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": "plan_trip"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesDestination, same forms as from
busNoA preferred bus or green minibus number, e.g. "33" or "1A": options are then only trips on it (its next departures from the nearest stop within about 10 minutes' walk, heading for the destination), or route_note says why there are none
fromYesStart: a place name, address or "lat,lon" (e.g. "Tsim Sha Tsui Star Ferry", "238 Nathan Road", "22.2988,114.1722")
timeNoISO 8601 date-time, e.g. 2026-10-05T09:30:00+08:00 (Hong Kong is UTC+8). Default: now
adultsNoAged 12–59
optionsNoHow many route options
seniorsNoAged 60+
childrenNoAged 3–11
currencyNoAlso show fares in this currency (fares are charged in HKD). Default follows language
disabledNoPersons with disabilities
languageNoLanguage for place and line names: en, zh-HK (Traditional Chinese), zh-CN (Simplified), ja, koen
leave_atNoSame as time (the name the answer uses); time wins if both are given
arrive_byNotrue: time is when to arrive; false: when to leave
step_freeNoWheelchair / step-free: avoids stairs, minibuses and trams

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
sourceYes
messageNoSet when no route was found
optionsYes
leave_atNoISO 8601
arrive_byNoISO 8601
route_noteNoWhy no option rides the preferred route (none near the start, not heading that way, not running now)
travellersYes
open_in_plannerYesLink that opens this trip on the site with live times
preferred_routeNoThe bus asked for, normalised (e.g. "1A")
things_to_do_nearbyNoAffiliate ads (Klook): say so if shown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / leave_at
      Added value: +{
      +  "description": "Same as time (the name the answer uses); time wins if both are given",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • addedInput schema / properties / bus
      Added value: +{
      +  "description": "A preferred bus or green minibus number, e.g. \"33\" or \"1A\": options are then only trips on it (its next departures from the nearest stop within about 10 minutes' walk, heading for the destination), or route_note says why there are none",
      +  "maxLength": 6,
      +  "type": "string"
      +}
    • addedOutput schema / properties / options / items / properties / on_preferred_route
      Added value: +{
      +  "description": "With bus: whether this option rides it",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / options / items / properties / warnings
      Added value: +{
      +  "description": "Live disruptions on this option: an MTR line it rides reporting a delay, a road incident near its bus or tram route",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / options / items / required
      Previous value: -[
      -  "depart",
      -  "arrive",
      -  "minutes",
      -  "transfers",
      -  "best_for",
      -  "fare",
      -  "steps"
      -]New value: +[
      +  "depart",
      +  "arrive",
      +  "minutes",
      +  "transfers",
      +  "best_for",
      +  "warnings",
      +  "fare",
      +  "steps"
      +]
    • addedOutput schema / properties / preferred_route
      Added value: +{
      +  "description": "The bus asked for, normalised (e.g. \"1A\")",
      +  "type": "string"
      +}
    • addedOutput schema / properties / route_note
      Added value: +{
      +  "description": "Why no option rides the preferred route (none near the start, not heading that way, not running now)",
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Beyond readOnlyHint and openWorldHint, the description discloses meaningful behavior: results are 'best first', include live next departures, traffic delays, walking/riding details, group fares, a map link, and affiliate Klook ads. It does not discuss possible data limitations or error conditions, but it adds substantial behavioral context beyond 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?

The description is two front-loaded sentences with no filler: the first states the routing purpose and key outputs, and the second discloses the affiliate content. Every phrase contributes useful information about what the tool does and returns.

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 that an output schema exists and schema coverage is complete, the description provides enough context about coverage, modes, outputs, live data, and affiliate ads for an agent to call the tool correctly. The main missing contextual piece is routing guidance relative to sibling tools, which is covered separately under usage guidelines.

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 input schema already explains parameters such as bus, step_free, arrive_by, and passenger counts. The description mentions group fares and trip details but adds no meaning beyond the schema for individual parameters, so the baseline of 3 is appropriate.

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 specific routing action between two Hong Kong places and names the transport modes and outputs, making the tool's purpose clear. It does not explicitly distinguish itself from nearby siblings such as search_routes or nearby_departures, so sibling differentiation is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool returns but gives no explicit when-to-use, when-not-to-use, or alternative-tool guidance. An agent must infer from the name and purpose that this is for point-to-point trip planning rather than route search, nearby departures, or service updates.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources