Skip to main content
Glama

elevation-mcp-server

Check Terrain Line of Sight

elevation_check_line_of_sight
Read-onlyIdempotent

Check whether terrain blocks the straight sightline between an observer and a target, each at a height above the ground, accounting for earth curvature and atmospheric refraction. Returns a verdict of clear, blocked, or indeterminate (when samples along the line have no data), the minimum clearance and the terrain point that limits it, and the first obstruction from the observer when blocked. With frequency_mhz, it also reports first Fresnel zone clearance against the 60% free-space bar. Where Mapzen reports sea-floor depth over open water, clearance is measured to the sea surface; USGS 3DEP values below 0 m (bay floor in some bays, or dry land) count as received unless water_surface_m sets a water level. Models terrain only: buildings and vegetation are not modeled beyond what the elevation source itself captures, and a ridge narrower than the reported sample spacing can be missed. To see the terrain between the points, call elevation_get_profile on the same two points.

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": {
      "observer": "<observer>",
      "target": "<target>"
    },
    "name": "elevation_check_line_of_sight"
  }
}

Input Schema

NameRequiredDescriptionDefault
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
targetYesTarget location as {lat, lon} in decimal degrees (WGS84).
samplesNoEvenly spaced terrain samples along the line, endpoints included (3–250, default 100). Spacing is reported; a ridge narrower than it can be missed.
observerYesObserver location as {lat, lon} in decimal degrees (WGS84).
earth_modelNoEarth model: flat ignores curvature; geometric applies curvature without refraction; optical applies standard visible-light refraction (coefficient 0.13, default); radio applies the standard 4/3-earth radio refraction (coefficient 0.25).optical
frequency_mhzNoRadio frequency in MHz (30–300,000; 5800 for 5.8 GHz). When set, the result adds first Fresnel zone clearance against the 60% free-space bar; pair it with earth_model radio.
target_height_mNoTarget height above ground, meters (default 0, the ground itself). Set it for a tower, building top, or second antenna.
water_surface_mNoWater level in meters (-500 to 9,000). When set, each sample's surface, endpoints included, is the higher of its elevation and this level, replacing the default that lifts only Mapzen sea-floor values to 0 m. Requires a vertical reference compatible with the sampled terrain; choosing zero or source opentopodata alone does not establish compatibility. No datum conversion is performed.
observer_height_mNoObserver eye or antenna height above ground, meters (default 1.7, standing eye height).

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance on clamped counts, coarse sampling, unconfirmed sightlines, thin clearance margins, a clear line short of 60% first Fresnel zone clearance, lines crossing the USGS 3DEP coverage edge, samples over open water or below water_surface_m, and USGS 3DEP values below 0 m.
targetNoThe target's end of the sightline; fields as on observer.
fresnelNoFirst Fresnel zone clearance; present only when frequency_mhz is set. Zone radius = √(λ·d₁·d₂/D) m, with λ = 299.792458 / frequency_mhz, d₁ and d₂ the distances to each end, and D the line length.
samplesNoSamples along the line, endpoints included.
verdictNoblocked when terrain reaches the sightline at any sample; clear when every sample between the endpoints has data and lies below it; indeterminate when samples without data leave the line unconfirmed.
observerNoThe observer's end of the sightline, in decimal degrees and meters. Ground elevation is as the dataset reports it; surface is the higher of the ground and water_surface_m when set, otherwise the ground, or 0 where a Mapzen value below 0 marks open water; sightline = surface + height. resolution_m is absent for mapzen.
distance_mNoGreat-circle distance from observer to target, meters.
attributionNoSources to credit for the returned values, one line per dataset that answered.
earth_modelNoThe earth model applied.
source_modeNoThe source the call used (auto unless the caller chose one).
datasets_usedNoNumber of values each dataset answered.
limiting_pointNoThe sample between the endpoints with the smallest clearance (first on ties); absent when none of them has data. Units, surface, and resolution_m as on observer, with terrain in place of its ground; bulge is the rise of the curved surface above the straight observer-target chord (0 for flat); clearance = sightline − (surface + bulge), and 0 or below means blocked.
min_clearance_mNoSmallest clearance over samples between the endpoints, meters (negative means terrain above the sightline). Absent when none of them has data.
missing_samplesNoSamples no queried dataset answered.
min_clearance_ftNoSmallest clearance in international feet. Absent with min_clearance_m.
first_obstructionNoThe obstructing sample nearest the observer; present only when the verdict is blocked. Fields as on limiting_point.
sample_interval_mNoDistance between consecutive samples, meters.
samples_with_dataNoSamples with an elevation, endpoints included.
obstructed_samplesNoSamples between the endpoints with clearance 0 or below.
vertical_referenceNoHeight-reference context per answering dataset, including unverified references and whether heights share a datum. No vertical datum conversion is performed.
refraction_coefficientNoRefraction coefficient applied. Absent for the flat model.
effective_earth_radius_mNoEarth radius divided by (1 − refraction coefficient), meters. Absent for the flat model.

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: `same_endpoints`: Observer and target are under 1 m apart. `sightline_too_long`: Observer and target are more than 1,000 km apart. `endpoint_no_data`: The observer's or target's own sample has no data, so its sightline height is unknown. `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: `same_endpoints`: Observer and target are under 1 m apart. `sightline_too_long`: Observer and target are more than 1,000 km apart. `endpoint_no_data`: The observer's or target's own sample has no data, so its sightline height is unknown. `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 unconfirmed sightlines, thin clearance margins, a clear line short of 60% first Fresnel zone clearance, lines crossing the USGS 3DEP coverage edge, samples over open water or below water_surface_m, and USGS 3DEP values below 0 m."New value: +"Guidance on clamped counts, coarse sampling, unconfirmed sightlines, thin clearance margins, a clear line short of 60% first Fresnel zone clearance, lines crossing the USGS 3DEP coverage edge, samples over open water or below water_surface_m, and USGS 3DEP values below 0 m."
  2. Changed3 schema fields changed
    • changedInput schema / properties / water_surface_m / description
      Previous value: -"Water level in meters (-500 to 9,000). When set, each sample's surface, endpoints included, is the higher of its elevation and this level, replacing the default that lifts only Mapzen sea-floor values to 0 m. Set it where the line crosses water: 0 where USGS 3DEP reports a bay floor, or a lake or tide level."New value: +"Water level in meters (-500 to 9,000). When set, each sample's surface, endpoints included, is the higher of its elevation and this level, replacing the default that lifts only Mapzen sea-floor values to 0 m. Requires a vertical reference compatible with the sampled terrain; choosing zero or source opentopodata alone does not establish compatibility. No datum conversion is performed."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "verdict",
      -      "distance_m",
      -      "observer",
      -      "target",
      -      "obstructed_samples",
      -      "earth_model",
      -      "sample_interval_m",
      -      "samples",
      -      "samples_with_data",
      -      "missing_samples",
      -      "datasets_used",
      -      "source_mode",
      -      "attribution"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "verdict",
      +      "distance_m",
      +      "observer",
      +      "target",
      +      "obstructed_samples",
      +      "earth_model",
      +      "sample_interval_m",
      +      "samples",
      +      "samples_with_data",
      +      "missing_samples",
      +      "datasets_used",
      +      "source_mode",
      +      "vertical_reference",
      +      "attribution"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • 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.6/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent, and the description goes well beyond them: it names the three possible verdicts including 'indeterminate' when samples have no data, explains sea-floor and sub-zero elevation handling, warns that buildings and vegetation are unmodeled, and cautions that a ridge narrower than the sample spacing can be missed. These are exactly the failure modes an agent needs before trusting a 'clear' result.

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?

It is front-loaded with the core purpose and verdict semantics before moving to caveats and sibling routing, so the important content comes first. Sentences are dense and long (the water-surface sentence requires re-reading), but almost every clause carries operational information rather than filler.

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 9-parameter, nested-object tool with an output schema, the description covers the questions that persist after the schema: what verdicts are possible, what happens with missing samples, how water and negative elevations are treated, and where the terrain model is blind. An output schema exists so return-value details are adequately covered by the brief summary of what is reported.

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 adds cross-parameter meaning the schema states only in isolation: that frequency_mhz yields Fresnel-zone clearance against the 60% bar, and that water_surface_m overrides the default only-Mapzen-lift-to-zero rule while counting USGS 3DEP values below 0 m as received. That interaction logic materially helps a caller choose values.

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 first sentence states a specific verb and resource ('check whether terrain blocks the straight sightline between an observer and a target') plus the physics it accounts for, and the closing sentence distinguishes it from elevation_get_profile. An agent can tell exactly what this tool answers without opening the schema.

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?

It gives explicit routing to a sibling ('To see the terrain between the points, call elevation_get_profile on the same two points') and implicitly frames itself as the yes/no obstruction verdict rather than a data dump. It does not explicitly address elevation_get_points or elevation_get_grid, and it offers no when-not-to-use guidance beyond the terrain-modeling caveat.

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.