Skip to main content
Glama

Search lines, stations, and POIs

bus_search
Read-onlyIdempotent

Search bus lines, stations, and points of interest in a city with a keyword. Returns matching routes, stops, and destinations in a single call.

Instructions

Search inside a city by keyword. Returns matching lines, stations, and POIs in one call.

Use this as the primary entry point when the user gives a line number, station name, or destination name without IDs.

Keyword tip: plain "71", "71路", "地铁2号线", "陆家嘴" all work — the upstream is reasonably forgiving. If a short numeric returns empty, try appending "路".

Coordinate systems:

  • 'pois' coords are GCJ-02 (use directly with bus_plan_transit)

  • 'stations' coords are WGS-84 (use with bus_get_nearby_stops / bus_get_line_realtime) Both are also marked with a 'gpsType' field.

Args:

  • city_id (string, required): e.g. '034'

  • keyword (string, required)

  • response_format ('markdown' | 'json')

Returns (json): { "highlightKey": "71路", "lines": [ { "name": "71", "lineNo": "r95817", "isSubway": false, "directions": [ { "direction": 0, "lineId": "21283603183", "startSn": "延安东路外滩", "endSn": "申昆路枢纽站" }, { "direction": 1, "lineId": "21283603182", "startSn": "申昆路枢纽站", "endSn": "延安东路外滩" } ], // Compat top-level fields mirror directions[0] (or first available). "lineId": "21283603183", "direction": 0, "startSn": "延安东路外滩", "endSn": "申昆路枢纽站" }, ... ], "stations": [{ "sId":"...", "sn":"西藏中路", "lat":31.231006, "lng":121.474316, "gpsType":"wgs", "physicalStId":"...", "namesakeStId":"...", "isSubway":false }, ...], "pois": [{ "name":"71路", "address":"...", "tag":"公交线路", "district":"黄浦区", "lat":31.233021, "lng":121.49073, "gpsType":"gcj" }, ...] }

Line folding: each entry in 'lines' is one logical line (e.g. "71路"). The two travel directions live in 'directions[]'. Pick the lineId matching your desired direction.

Subway hint: when 'isSubway' is true, the entry carries a 'hint' field — bus_get_line_detail will return empty for these lineIds. Use bus_get_stop_detail (metros field) or bus_plan_transit instead.

Follow-ups:

  • directions[i].lineId → bus_get_line_detail (full stop list, first/last/price) — non-subway only

  • stations[*].physicalStId + namesakeStId → bus_get_stop_detail (NOTE: a few stations lack physicalStId — typically metro-only entries with subwayV2=1. For those, use bus_get_nearby_stops to resolve the bus platform IDs nearby.)

  • pois[*].lat/lng (GCJ) → bus_plan_transit as origin/destination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
city_idYesCity ID, e.g. '034'
keywordYesSearch keyword. Examples: '71', '71路', '地铁2号线', '陆家嘴', '人民广场'. Plain line numbers like '71' work fine.
response_formatNoOutput format: 'markdown' for human-readable text, 'json' for full structured datamarkdown
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, openWorldHint. The description adds critical details: coordinate systems (GCJ-02 for pois, WGS-84 for stations), line folding, subway handling (bus_get_line_detail empty for subways), and special cases for missing station IDs. No contradictions found.

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?

Well-structured with clear sections (main usage, keyword tips, coordinate systems, return example, line folding, subway hint, follow-ups). Front-loaded with essential info. Slightly long but every part adds value; minor redundancy in repeating schema's args briefly.

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 the complexity (three entity types, coordinate differences, line directions, subway exceptions), the description is extremely thorough. It covers empty results, coordinate usage, line ID selection, subway handling, and follow-up tool usage. No output schema, so the detailed return example compensates perfectly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description significantly enriches parameter meaning: keyword tip (plain numbers, suffixes), city_id example, response_format effect. Also explains return structure in depth, which aids understanding of how parameters affect results.

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 searches by keyword and returns lines, stations, and POIs in one call. It distinguishes itself as the primary entry point for user queries without IDs, setting it apart from siblings like bus_search_more.

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

Usage Guidelines5/5

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

Explicitly advises using this as the primary entry point for line numbers, station names, or destinations without IDs. Provides tips for handling empty results (appending '路') and includes a follow-ups section directing to specific tools for each part of the return data.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PeanutSplash/chelaile-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server