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. Set it where the line crosses water: 0 where USGS 3DEP reports a bay floor, or a lake or tide level.
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.
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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing model limitations (buildings and vegetation not modeled, a ridge narrower than the sample spacing can be missed), the three-valued verdict, and the sea-floor/negative-elevation handling rules for Mapzen vs USGS 3DEP. This is exactly the behavioral context an agent needs before trusting the 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?

Front-loads what the tool does and what it returns before dropping into edge cases and caveats. The text is dense and lengthy, but nearly every sentence carries distinct operational information; only the return-value recitation is mildly redundant given the output schema exists.

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, enums-bearing tool, the description covers sampling caveats, source-specific edge cases, water handling, and the sibling escape hatch. With an output schema present, it does not need to enumerate return fields, and its coverage of gotchas is complete enough to call the tool correctly.

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 genuine interaction semantics the schema alone does not convey (frequency_mhz should be paired with earth_model radio; water_surface_m replaces the default Mapzen-only lift; the 60% free-space bar). It largely restates rather than extends the earth_model coefficients, keeping it short of a 5.

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 ('check whether terrain blocks the straight sightline between an observer and a target'), including the height/curvature/refraction scope. It explicitly distinguishes itself from the sibling elevation_get_profile and its output vocabulary (clear/blocked/indeterminate) sets it apart from the other elevation 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 conditional usage for optional parameters ('With frequency_mhz, it also reports... pair it with earth_model radio', 'Set it where the line crosses water') and routes the agent to elevation_get_profile when the terrain between points is wanted. It lacks an explicit when-not-to-use statement, but the alternative is named clearly.

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.