Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Elevation Tool

elevation_tool
Read-onlyIdempotent

Get ground elevation for places or routes to return heights, total climb and descent, high and low points, and an elevation profile for assessing how high or hilly a location or trail is.

Instructions

Gets ground elevation from Mapbox terrain data. Give it places (points) for the height above sea level of each, or a line (path, or route_ref from a directions_tool or map_matching_tool result) for total climb and descent, the highest and lowest points, and an elevation profile. Use it for questions like "how high is this town?", "how hilly is this bike route?", "how much climbing is on this trail run?" or, for a recorded GPS trace matched with map_matching_tool, "how much did I climb?". Elevations are of the ground (bare earth), not buildings or bridges. Long paths are read at a coarser resolution (see resolution_m in the result), which can undercount small hills.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "elevation_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoA line (hike, ride, run) as ordered coordinates, for climb, descent and an elevation profile along it. For a route from directions_tool or a GPS trace matched with map_matching_tool, pass route_ref instead.
pointsNoUp to 25 places to get the ground elevation of, e.g. a summit, a town or a campsite.
route_refNoThe structuredContent.mapboxRender.ref from a directions_tool result (a planned route) or a map_matching_tool result (a recorded run, ride or hike), passed unchanged. The tool fetches the full line itself, so you never need to copy route geometry.

Output Schema

NameRequiredDescriptionDefault
pathNo
zoomYesTile zoom used; lower on long paths
pointsNo
sourceYesTileset the elevations were read from
mapboxRenderNo
resolution_mYesGround size of one elevation pixel at that zoom

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds genuinely useful behavior an agent could not infer: elevations are bare-earth, not buildings or bridges, and long paths are sampled at a coarser resolution ('see `resolution_m`') that can undercount small hills. That caveat about data fidelity is exactly the kind of disclosure annotations cannot carry.

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?

Front-loaded with the core capability, then mode selection, then use cases, then the ground-vs-structure and resolution caveats in a logical order. It is dense but every sentence contributes; the caveat sentence is the only place that runs slightly long.

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?

For a read-only terrain lookup with three optional parameters and an output schema, the description covers inputs, intended use cases, provenance of `route_ref`, and known accuracy limits. Nothing an agent needs to call it correctly or interpret results is missing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3; the description nonetheless clarifies the mutually exclusive intent of `points` versus `path`/`route_ref` and explains where `route_ref` comes from and that geometry need not be copied. It stops short of adding format or limits beyond the schema (maxItems, coordinate ranges), so it is an incremental rather than decisive gain.

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?

States a specific verb and resource ('Gets ground elevation from Mapbox terrain data') and immediately splits the tool into two clearly labelled modes: per-place elevation via `points`, and climb/descent/profile via `path` or `route_ref`. It also names the sibling tools whose output feeds `route_ref`, so an agent can place it in the workflow without opening a schema.

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?

Gives concrete selection rules ('Give it places for the height above sea level of each, or a line for total climb and descent') plus the route_ref shortcut for directions_tool and map_matching_tool results. The example questions ('how high is this town?', 'how hilly is this bike route?', 'how much did I climb?') map directly onto the parameter choice, leaving little inference.

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