Skip to main content
Glama

dem_viewshed

Compute visible area from an observer point using DEM elevation data, with configurable radius, height, source, and GeoTIFF or PNG output for terrain visibility analysis.

Instructions

Compute viewshed (visible area) from an observer point.

Args: observer: Observer location [lon, lat] radius_m: Analysis radius in metres (max 50000) source: DEM source (cop30, cop90, srtm, aster, 3dep, fabdem) observer_height_m: Observer height above ground in metres (default 1.8) output_format: Output format (geotiff or png) output_mode: "json" or "text"

Returns: Viewshed raster artifact with visible percentage

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>",
      "radius_m": "<radius_m>"
    },
    "name": "dem_viewshed"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceNocop30
observerYes
radius_mYes
output_modeNojson
output_formatNogeotiff
observer_height_mNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden; it does disclose useful constraints (radius max 50000 m, observer_height default 1.8, allowed output formats and sources). However, it says nothing about coordinate-system expectations, whether the operation is purely read-only, latency or cost for a large radius, error behavior, or what the 'text' output_mode actually returns.

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 one-line purpose is front-loaded, followed by a compact args list with no filler sentences. The 'Args:'/'Returns:' docstring formatting is slightly code-oriented rather than prose, but every line carries information about a distinct parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter compute tool with no output schema and no annotations, the description covers purpose, inputs, and a rough return summary, which is close to adequate. Gaps remain around choosing a source, the meaning of output_mode, and how the returned raster artifact is delivered or referenced.

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 0%, and the description compensates substantially by documenting all six parameters, their defaults, the [lon, lat] ordering of observer, and enumerations for source and output_format that are absent from the schema. It stops short of explaining what output_mode 'json' versus 'text' changes or any minimum radius.

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?

The first sentence names a specific verb and resource ('Compute viewshed') and parenthetically defines the output ('visible area') from an 'observer point', so an agent knows exactly what it produces. It does not explicitly contrast itself with siblings such as dem_slope or dem_hillshade, but no sibling appears to overlap, so distinguishing is largely implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not guidance: nothing says when a viewshed is the right analysis versus dem_profile or dem_map, and nothing hints at how to pick among the five DEM sources (cop30/cop90/srtm/aster/3dep/fabdem). The only usage-adjacent content is the hard cap on radius_m, which constrains a call but does not route the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.