Skip to main content
Glama

Get the nearest approaching bus on a line

bus_list_line_buses
Read-onlyIdempotent

Retrieve the imminent bus arrival at a specific stop: shows ETA and next stop name for the nearest bus heading to that stop.

Instructions

Returns the nearest bus heading to the anchor stop, with ETA and the bus's next stop name.

This is narrower than the name suggests. Despite the upstream endpoint being called "busList", in practice it returns at most 1-2 buses (the imminent ones). For the FULL roster of every bus currently on the line, call bus_get_line_detail — its 'buses' array lists all live vehicles with positions.

Use this tool when you want a quick "what's about to arrive" answer for a specific stop.

Args:

  • city_id (string, required)

  • line_id (string, required)

  • target_order (string, required): the waiting stop's order on the line

  • station_name (string, required): display name of that anchor stop

  • response_format ('markdown' | 'json')

Returns (json): { "targetOrder": 2, "buses": [ { "busId":"...", "licence":"...", "order":2, "lat":..., "lng":..., "speed":8.2, "capacity":0, "nextStop":"西藏中路", "eta":{"travelTime":214,"arrivalTime":..., "displayTime":"10:14"} } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
city_idYes
line_idYes
target_orderYes
station_nameYesDisplay name of the target stop
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?

Adds significant context beyond annotations: discloses that despite the name 'busList', it returns at most 1-2 buses (imminent ones), and explains the narrow scope. No contradictions with annotations (readOnlyHint, destructiveHint, etc.).

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?

Well-structured: summary, caveat, usage guidance, parameter list, return example. Every sentence adds value, no unnecessary words. Front-loaded with key info.

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?

Includes sample return JSON and usage guidance, but lacks handling of edge cases (e.g., no bus found) or error info. Still sufficiently complete for correct invocation given the sample and sibling contrast.

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 coverage is 40% (low). Description adds meaning for target_order ('the waiting stop's order') and clarifies station_name, but city_id and line_id are not explained beyond schema. Acceptable compensation for low coverage, not outstanding.

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?

Description clearly states it returns the nearest approaching bus with ETA, contrasting with bus_get_line_detail which returns full roster. The verb 'returns' and resource 'nearest bus' are specific, and the sibling differentiation is explicit.

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 says 'Use this tool when you want a quick "what's about to arrive" answer' and directs to bus_get_line_detail for full bus list, providing both context and alternative.

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