Skip to main content
Glama

Get line polyline coordinates

bus_get_line_route
Read-onlyIdempotent

Retrieve polyline coordinates of a bus line's route for map visualization. Returns stop markers by default; include_shape=true for full shape points to draw the line accurately.

Instructions

Polyline coordinates for drawing a line on a map. Points with 'stopOrder' are actual stops; others are shape points between stops.

Args:

  • city_id (string, required)

  • line_id (string, required)

  • include_shape (boolean, default false): false returns only stop markers (~25 points); true returns all shape points (~400-500). Skip unless you actually need to draw the line.

  • response_format ('markdown' | 'json')

Returns (json): { "pointCount": 480, // total shape points upstream returned "stopCount": 23, // stop markers among them "points": [{ "lat":..., "lng":..., "stopOrder":1 }, ...] } 'points' is the filtered list — stops only by default, full polyline when include_shape=true.

Known caveat: upstream sometimes omits the terminus stop from the polyline, so 'stopCount' may be one less than bus_get_line_detail's 'stationsNum' (e.g. 23 vs 24). Trust bus_get_line_detail for the authoritative station list; line_route is just for drawing.

Markdown mode only summarises counts; request JSON to read coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
city_idYes
line_idYes
include_shapeNoIf true, include all polyline shape points (often 400-500 per line). Default false returns only stop-marker points.
response_formatNoOutput format: 'markdown' for human-readable text, 'json' for full structured datamarkdown
Behavior4/5

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

Annotations already indicate safe, read-only behavior, but the description adds valuable caveats about terminus omission and point counts, enriching transparency beyond annotations.

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 sections for args, returns, and caveats; every sentence adds value, though slightly lengthy. Could be more concise without losing clarity.

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?

Comprehensively covers parameters, return format, known caveats, and references sibling tools; no gaps given the tool's complexity and lack of output schema.

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 50%; description adds meaningful detail for include_shape and response_format but merely restates city_id and line_id without extra semantics. Adequate but not exceptional.

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 returns polyline coordinates for drawing a line on a map, and distinguishes itself from sibling tool bus_get_line_detail, which provides authoritative station lists.

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?

Provides explicit guidance on when to use include_shape (skip unless needed) and recommends bus_get_line_detail for authoritative stop data, offering clear decision context.

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