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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance 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.
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. 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"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, openWorld, so the bar is lower — yet the description adds substantial context beyond them: the verdict values (clear/blocked/indeterminate) and what indeterminate means, the minimum-clearance limiting point, first-obstruction reporting, sea-floor/water-surface handling, and explicit modeling limitations (no buildings/vegetation, narrow ridges missed). It also flags the datum-compatibility caveat for water_surface_m.

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 core purpose is front-loaded in the first sentence, and each subsequent sentence carries distinct information (returns, Fresnel behavior, water handling, limitations, sibling routing). It is longer than the ideal but has little filler; the density is justified by the tool's complexity.

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 everything an agent needs: purpose, conditional outputs, source/earth-model interactions, water-level edge cases, and known modeling blind spots. Return values being described is a bonus rather than a necessity given the output schema.

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 description coverage is 100%, so 3 is the baseline, but the description adds cross-parameter meaning: the Fresnel-zone 60% bar triggered by frequency_mhz and its pairing with earth_model radio, the earth_model default (optical, coefficient 0.13), and the water_surface_m override semantics. This is genuine synthesis beyond the per-parameter schema text.

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 — checking whether terrain blocks the sightline between an observer and a target at given heights — and adds scope qualifiers (earth curvature, atmospheric refraction). It distinguishes itself from siblings by routing to elevation_get_profile for the intervening terrain, so an agent can separate this from the raw point/profile/grid tools.

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?

Gives explicit usage context: use elevation_get_profile to see terrain between the two points, and pair frequency_mhz with earth_model radio. It also scopes applicability (terrain-only analysis; water-surface handling). It stops short of stating when this tool is the wrong choice versus elevation_get_points for a simple obstruction-free lookup.

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.