Skip to main content
Glama

elevation-mcp-server

Get Route Elevation Profile

elevation_get_profile
Read-onlyIdempotent

Sample terrain elevation at evenly spaced points along a route (a polyline of 2–1,000 vertices) and summarize it. Returns total distance, cumulative ascent and descent, start, end, minimum, and maximum elevation, and the steepest climb and descent grades, plus the per-sample profile with each sample's dataset unless include_samples is false. Ascent and descent are summed between samples, so they depend on the sample spacing reported in the result: denser sampling captures more small climbs, down to the source's resolution. Over open water, Mapzen samples are sea-floor depths.

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": {
      "path": "<path>"
    },
    "name": "elevation_get_profile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRoute vertices in travel order, 2–1,000 {lat, lon} objects in decimal degrees (WGS84). Consecutive duplicate vertices are ignored. Antipodal retained segments require an intermediate waypoint, even with endpoint-only sampling; errors identify zero-based submitted vertex indices.
sourceNoElevation source: auto (default) uses USGS 3DEP where it has data and Open Topo Data (SRTM, with Mapzen terrain tiles where SRTM has no data) for the rest; usgs_3dep uses 3DEP only; opentopodata uses Open Topo Data only. Case is ignored and spaces or hyphens read as underscores, so USGS-3DEP and open topo data are accepted; 3dep, usgs, and epqs are also aliases for usgs_3dep.auto
samplesNoNumber of evenly spaced samples along the route, endpoints included (2–250, default 100). More samples catch more relief and take longer; spacing finer than the source resolution adds no detail. For a large count where only the summary matters, set include_samples to false.
include_samplesNoReturn the per-sample profile (default true). false omits samples and the sample table; the summary, spacing, coverage counts, datasets, notices, and attribution are unchanged, still computed from every sample.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance on clamped counts, samples without data, routes crossing the USGS 3DEP coverage edge, Mapzen sea-floor values, and sample spacing against the source resolution.
samplesNoEvery sample in route order, endpoints included. Absent when include_samples is false.
summaryNoRoute statistics over the samples with data, bridging samples without data.
verticesNoRoute vertices after dropping consecutive duplicates.
attributionNoSources to credit for the returned values, one line per dataset that answered.
source_modeNoThe source the call used (auto unless the caller chose one).
datasets_usedNoNumber of values each dataset answered.
missing_samplesNoSamples no queried dataset answered.
sample_interval_mNoDistance between consecutive samples, meters: route length / (samples − 1).
samples_with_dataNoSamples with an elevation.
resolution_m_rangeNoRange of source resolutions over values that report one; absent when none does (all Mapzen).
vertical_referenceNoHeight-reference context per answering dataset, including unverified references and whether heights share a datum. No vertical datum conversion is performed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `antipodal_path`: A retained path segment has antipodal endpoints after dropping consecutive duplicates, so its shorter arc is ambiguous. `degenerate_path`: After dropping consecutive duplicate vertices, fewer than 2 vertices remain, or the route is under 1 m long. `no_coverage`: No sample along the route returned an elevation. `usgs_unavailable`: USGS 3DEP failed: a server error, rate limit, network error, or timeout that outlasted the retries (retryable), or a client error or unexpected status that retrying cannot fix (not retryable). `opentopodata_unavailable`: Open Topo Data failed: a server error, network error, timeout, or unreadable response that outlasted the retries (retryable), or an unexpected status that retrying cannot fix (not retryable). `opentopodata_rate_limited`: Open Topo Data kept answering HTTP 429 through the retries, or asked for a wait over 8 s. `opentopodata_daily_limit`: Only on the public Open Topo Data instance: this server has sent it 1,000 requests in the trailing 24 hours, so no request was sent. `opentopodata_config_rejected`: The Open Topo Data instance answered 401, 403, or 404, a redirect from a self-hosted instance, a 400 naming a dataset it lacks or a location limit below 100, or a 200 naming a dataset this server did not request. `sampling_deadline_exceeded`: The call's 45 s sampling budget ran out (a retry deadline, or a wait in either provider's request queue), or the USGS 3DEP lookups other calls had queued, plus this call's, would not drain within the calls' budgets, so it sent none and data.retryAfter gives the seconds until the queued lookups drain. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `antipodal_path`: A retained path segment has antipodal endpoints after dropping consecutive duplicates, so its shorter arc is ambiguous. `degenerate_path`: After dropping consecutive duplicate vertices, fewer than 2 vertices remain, or the route is under 1 m long. `no_coverage`: No sample along the route returned an elevation. `usgs_unavailable`: USGS 3DEP failed: a server error, rate limit, network error, or timeout that outlasted the retries (retryable), or a client error or unexpected status that retrying cannot fix (not retryable). `opentopodata_unavailable`: Open Topo Data failed: a server error, network error, timeout, or unreadable response that outlasted the retries (retryable), or an unexpected status that retrying cannot fix (not retryable). `opentopodata_rate_limited`: Open Topo Data kept answering HTTP 429 through the retries, or asked for a wait over 8 s. `opentopodata_daily_limit`: Only on the public Open Topo Data instance: this server has sent it 1,000 requests in the trailing 24 hours, so no request was sent. `opentopodata_config_rejected`: The Open Topo Data instance answered 401, 403, or 404, a redirect from a self-hosted instance, a 400 naming a dataset it lacks or a location limit below 100, or a 200 naming a dataset this server did not request. `sampling_deadline_exceeded`: The call's 45 s sampling budget ran out, or its individual USGS 3DEP lookups could not fit within the remaining budget alongside queued lookups. When data.retryAfter is present, it gives the seconds until the queued lookups drain. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance on samples without data, routes crossing the USGS 3DEP coverage edge, Mapzen sea-floor values, and sample spacing against the source resolution."New value: +"Guidance on clamped counts, samples without data, routes crossing the USGS 3DEP coverage edge, Mapzen sea-floor values, and sample spacing against the source resolution."
  2. Changed5 schema fields changed
    • changedInput schema / properties / path / description
      Previous value: -"Route vertices in travel order, 2–1,000 {lat, lon} objects in decimal degrees (WGS84). Consecutive duplicate vertices are ignored."New value: +"Route vertices in travel order, 2–1,000 {lat, lon} objects in decimal degrees (WGS84). Consecutive duplicate vertices are ignored. Antipodal retained segments require an intermediate waypoint, even with endpoint-only sampling; errors identify zero-based submitted vertex indices."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "summary",
      -      "sample_interval_m",
      -      "vertices",
      -      "samples_with_data",
      -      "missing_samples",
      -      "datasets_used",
      -      "source_mode",
      -      "attribution"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "summary",
      +      "sample_interval_m",
      +      "vertices",
      +      "samples_with_data",
      +      "missing_samples",
      +      "datasets_used",
      +      "source_mode",
      +      "vertical_reference",
      +      "attribution"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `degenerate_path`: After dropping consecutive duplicate vertices, fewer than 2 vertices remain, or the route is under 1 m long. `no_coverage`: No sample along the route returned an elevation. `usgs_unavailable`: USGS 3DEP failed: a server error, rate limit, network error, or timeout that outlasted the retries (retryable), or a client error or unexpected status that retrying cannot fix (not retryable). `opentopodata_unavailable`: Open Topo Data failed: a server error, network error, timeout, or unreadable response that outlasted the retries (retryable), or an unexpected status that retrying cannot fix (not retryable). `opentopodata_rate_limited`: Open Topo Data kept answering HTTP 429 through the retries, or asked for a wait over 8 s. `opentopodata_daily_limit`: Only on the public Open Topo Data instance: this server has sent it 1,000 requests in the trailing 24 hours, so no request was sent. `opentopodata_config_rejected`: The Open Topo Data instance answered 401, 403, or 404, a redirect from a self-hosted instance, a 400 naming a dataset it lacks or a location limit below 100, or a 200 naming a dataset this server did not request. `sampling_deadline_exceeded`: The call's 45 s sampling budget ran out (a retry deadline, or a wait in either provider's request queue), or the USGS 3DEP lookups other calls had queued, plus this call's, would not drain within the calls' budgets, so it sent none and data.retryAfter gives the seconds until the queued lookups drain. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `antipodal_path`: A retained path segment has antipodal endpoints after dropping consecutive duplicates, so its shorter arc is ambiguous. `degenerate_path`: After dropping consecutive duplicate vertices, fewer than 2 vertices remain, or the route is under 1 m long. `no_coverage`: No sample along the route returned an elevation. `usgs_unavailable`: USGS 3DEP failed: a server error, rate limit, network error, or timeout that outlasted the retries (retryable), or a client error or unexpected status that retrying cannot fix (not retryable). `opentopodata_unavailable`: Open Topo Data failed: a server error, network error, timeout, or unreadable response that outlasted the retries (retryable), or an unexpected status that retrying cannot fix (not retryable). `opentopodata_rate_limited`: Open Topo Data kept answering HTTP 429 through the retries, or asked for a wait over 8 s. `opentopodata_daily_limit`: Only on the public Open Topo Data instance: this server has sent it 1,000 requests in the trailing 24 hours, so no request was sent. `opentopodata_config_rejected`: The Open Topo Data instance answered 401, 403, or 404, a redirect from a self-hosted instance, a 400 naming a dataset it lacks or a location limit below 100, or a 200 naming a dataset this server did not request. `sampling_deadline_exceeded`: The call's 45 s sampling budget ran out (a retry deadline, or a wait in either provider's request queue), or the USGS 3DEP lookups other calls had queued, plus this call's, would not drain within the calls' budgets, so it sent none and data.retryAfter gives the seconds until the queued lookups drain. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "degenerate_path",
      -  "no_coverage",
      -  "usgs_unavailable",
      -  "opentopodata_unavailable",
      -  "opentopodata_rate_limited",
      -  "opentopodata_daily_limit",
      -  "opentopodata_config_rejected",
      -  "sampling_deadline_exceeded"
      -]New value: +[
      +  "antipodal_path",
      +  "degenerate_path",
      +  "no_coverage",
      +  "usgs_unavailable",
      +  "opentopodata_unavailable",
      +  "opentopodata_rate_limited",
      +  "opentopodata_daily_limit",
      +  "opentopodata_config_rejected",
      +  "sampling_deadline_exceeded"
      +]
    • addedOutput schema / properties / vertical_reference
      Added value: +{
      +  "description": "Height-reference context per answering dataset, including unverified references and whether heights share a datum. No vertical datum conversion is performed.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and open-world behavior, yet the description adds real substance beyond them: ascent/descent are summed between samples and therefore resolution-dependent, and over open water Mapzen samples return sea-floor depths. That water caveat and the sampling-dependence note are exactly the kind of quirks an agent could otherwise misread.

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 content is front-loaded with the core action and return shape, and the caveats follow in a logical order. It loses a little to restatement of bounds already in the schema (2–1,000 vertices, 2–250 samples) and runs as one dense block rather than separated concerns.

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?

With a full output schema, a complete parameter schema, and annotations present, the description supplies what is missing: source-selection behavior, sampling-resolution tradeoffs, and the water/depth edge case. An agent has enough to call it correctly and interpret the results, with only sibling routing left unstated.

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 the baseline is 3, but the description goes further by explaining why the samples parameter matters ('denser sampling captures more small climbs, down to the source's resolution') and by tying sample spacing back to the reported ascent/descent totals. It also clarifies that include_samples=false suppresses only the per-sample table, leaving summary metrics intact.

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 opens with a specific verb and resource: 'Sample terrain elevation at evenly spaced points along a route (a polyline of 2–1,000 vertices) and summarize it.' The route-based sampling plus summary output clearly separates it from point, grid, and line-of-sight siblings without naming them.

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?

Operational guidance is present ('For a large count where only the summary matters, set include_samples to false', and the note that denser sampling catches more relief), but there is no explicit guidance on when to choose this tool over elevation_get_points or elevation_get_grid. Usage is implied by the route vocabulary rather than stated.

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.