Skip to main content
Glama
mapbox

Mapbox MCP Server

Official

Measure Line Length

length_tool
Read-onlyIdempotent

Measure the total length of a line defined by coordinates. Supports kilometers, miles, meters, and feet. Works offline without API calls.

Instructions

Measure the total length of a line defined by a series of coordinates. Useful for measuring a drawn route, path, or boundary without a routing API call. Supports kilometers, miles, meters, and feet. Works offline without API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitsNoUnits for the length measurementmeters
coordinatesYesLineString coordinates as [longitude, latitude] pairs

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitsYesUnits of measurement
lengthYesTotal length of the line
num_coordinatesYesNumber of coordinate points in the line
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. Description adds value by mentioning offline capability and that no API call is made, providing 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?

Two clear sentences with no filler. Front-loaded purpose, followed by usage context.

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 rich annotations, 100% schema coverage, and presence of output schema (not shown but indicated), description is adequate. It provides purpose, usage context, offline capability. Could mention output format (e.g., returns number in selected units) but not necessary since output schema likely covers it.

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 100%, so baseline is 3. Description mentions units and coordinates but does not add meaningfully beyond schema descriptions. It lists units but schema already has enum and default. No additional detail on coordinate format or constraints.

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 the tool measures total length of a line from coordinates. It distinguishes from siblings like distance_tool (point-to-point) and area_tool by specifying 'line defined by a series of coordinates' and context of measuring routes/paths.

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

Usage Guidelines4/5

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

Description provides context: useful for drawn routes, paths, boundaries, and emphasizes no routing API call needed. This implies it's for geodesic vs road distances, but doesn't explicitly contrast with alternatives like distance_tool or directions_tool.

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/mapbox/mcp-server'

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