Skip to main content
Glama

geo_polyline

Read-only

Encoded polyline decode/encode — Offline Google Encoded Polyline codec (the format returned by Google Directions, OSRM, Valhalla, Mapbox, HERE flexible polyline is a different format). polyline= an encoded string to decode into [lat,lon] points plus a GeoJSON LineString, start/end, bbox and great-circle length in km/mi; precision is auto-detected (5 = Google, 6 = OSRM/Valhalla polyline6) or set with precision=. Or pass coords=lat,lon;lat,lon (or a JSON [[lat,lon]] array / GeoJSON LineString) instead to encode. Bad characters and truncated strings return 422 with the exact position. Price: $0.001 USDC (Base, via x402).

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": {
      "polyline": "<polyline>"
    },
    "name": "geo_polyline"
  }
}

Input Schema

NameRequiredDescriptionDefault
polylineYesotuwFriqbMwLwVgsBcaB

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, yet the description still adds real behavioral context: it runs offline, bad/truncated input returns 422 with the exact failing position, and each call costs $0.001 USDC via x402. That pricing and error contract is exactly the kind of information an agent cannot get from annotations, though the response shape beyond the listed fields is not described.

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 decode behavior is front-loaded and most clauses earn their place: the HERE-format exclusion, the 422 error contract, and the price are all decision-relevant. It is a dense semicolon-chained paragraph with a few stacked parentheticals, but no sentence is pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description must describe returns and it does reasonably well (lat/lon points, GeoJSON LineString, start/end, bbox, great-circle length in km/mi). The completeness gap is the schema/prose mismatch: an agent told it may pass 'coords=' or 'precision=' will find neither in the input schema, so a documented call path is not actually invocable.

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?

With a single parameter at 100% coverage the schema carries the baseline, and its 'description' is only an example string ('otuwFriqbMwLwVgsBcaB'), so the prose does useful work explaining what the encoded string represents. The gain is undercut by references to 'precision=' and 'coords=' arguments that do not exist in the schema, which will mislead an agent constructing a call.

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 gives a specific verb+resource pair ('Encoded polyline decode/encode') and names the exact wire formats it handles (Google Directions, OSRM, Valhalla, Mapbox), explicitly excluding HERE flexible polyline. It never names the neighboring geo_geojson or geo_coords tools, so an agent must still infer which sibling to prefer for non-polyline geometry work.

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?

It does distinguish the two modes ('polyline=' to decode, 'coords=' to encode) and explains that precision is auto-detected, which is genuine mode-selection guidance. However, it gives no when-not guidance against siblings such as geo_geojson or geo_coords, and the 'coords=' mode it advertises is not present in the input schema at all.

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