Skip to main content
Glama

elevation

Sample terrain elevation. Provide points (a bare list of coordinates) for point elevation, or encoded_polyline (optionally with resample_distance_m) for an along-route profile, not both. Returns one sample per point/resampled point in order; elevation_m is null wherever the engine's DEM tile set has no coverage at that point (never a guess). The encoded_polyline form also returns each sample's resampled lat/lon and cumulative range_km from the start.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
pointsNoPoints to sample. Provide this or `encoded_polyline`, not both.
encoded_polylineNoA route as a Google encoded polyline with six digits of precision. Provide this or `points`, not both.
resample_distance_mNoResamples `encoded_polyline` at this spacing in metres before sampling height (ignored for `points`).

Output Schema

NameRequiredDescriptionDefault
samplesYesOne sample per input point (or per resampled shape point, in the `encoded_polyline` form), in order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / $defs / ElevationSample / required
      Added value: +[
      +  "elevation_m"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / $defs / ElevationSample / properties / elevation_m / description
      Previous value: -"Elevation in metres, or `null` when the engine has no DEM tile\ncoverage at this point — Valhalla's own honest value, never a\nguess."New value: +"Elevation in metres, or `null` when the engine has no DEM tile\ncoverage at this point, Valhalla's own honest value, never a\nguess."
  3. Changed5 schema fields changed
    • addedInput schema / $defs / LatLon / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "lat": {
      +        "description": "Latitude in decimal degrees (−90 to 90).",
      +        "format": "double",
      +        "type": "number"
      +      },
      +      "lon": {
      +        "description": "Longitude in decimal degrees (−180 to 180).",
      +        "format": "double",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "lat",
      +      "lon"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "GeoJSON position [lon, lat]: longitude FIRST.",
      +    "items": {
      +      "format": "double",
      +      "type": "number"
      +    },
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / $defs / LatLon / description
      Previous value: -"A WGS84 coordinate pair in decimal degrees."New value: +"A WGS84 coordinate in decimal degrees: a {lat, lon} object (preferred), or a GeoJSON [lon, lat] array with LONGITUDE FIRST, the same order as every polygon field on this server."
    • removedInput schema / $defs / LatLon / properties
      Removed value: -{
      -  "lat": {
      -    "description": "Latitude in decimal degrees (−90 to 90).",
      -    "format": "double",
      -    "type": "number"
      -  },
      -  "lon": {
      -    "description": "Longitude in decimal degrees (−180 to 180).",
      -    "format": "double",
      -    "type": "number"
      -  }
      -}
    • removedInput schema / $defs / LatLon / required
      Removed value: -[
      -  "lat",
      -  "lon"
      -]
    • removedInput schema / $defs / LatLon / type
      Removed value: -"object"
  4. First observed

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose real behavioral traits: ordering (one sample per point, in order), the null-on-no-coverage contract ("never a guess"), and the extra fields returned for the polyline form. It omits practical operating constraints an agent would want — any cap on point count, behavior when both arguments are passed, and error/failure semantics.

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?

Three sentences, front-loaded with the purpose, then the argument-selection rule, then return semantics. Nothing is padding, and the "not both" constraint is placed right where the reader needs it.

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?

An output schema exists, yet the description still usefully previews the shape (per-sample `elevation_m`, resampled lat/lon and `range_km`), so an agent can plan around the null-coverage case. What is missing is operational completeness: no stated limits on the number of points, and no guidance on what happens when the argument rules are violated.

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 description coverage is 100%, so every parameter is already documented, including the mutual exclusivity and the note that `resample_distance_m` is ignored for `points`. The description largely restates that in prose rather than adding new meaning such as sensible resample spacings, coordinate-order pitfalls, or size limits.

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?

"Sample terrain elevation" is a specific verb+resource, and the description immediately splits the tool into its two operating modes (point sampling via `points`, route profiling via `encoded_polyline`). It never names or contrasts a sibling, so an agent gets no explicit differentiation from tools like `coverage_guidance` or the `geo_*` family, which keeps it below a 5.

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?

The description clearly states the selection rule between the two modes — point elevation vs. along-route profile — and enforces mutual exclusion with "not both." It stops short of naming alternatives or exclusions outside the tool (e.g., where to go to check DEM coverage before sampling), so it is clear context rather than full when/when-not guidance.

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