Skip to main content
Glama

dem_detect_anomalies

Detect terrain anomalies in DEM data using Isolation Forest on slope, curvature, and TRI features to flag anthropogenic features, data artefacts, or unusual geology.

Instructions

Detect terrain anomalies that don't fit the natural landscape.

Uses Isolation Forest on slope/curvature/TRI feature vectors to find outlier terrain. Catches anthropogenic features, data artefacts, or unusual geological features.

Requires scikit-learn: pip install chuk-mcp-dem[ml]

Args: bbox: Bounding box [west, south, east, north] in EPSG:4326 source: DEM source (cop30, cop90, srtm, aster, 3dep, fabdem) sensitivity: Detection sensitivity 0-1 (lower = fewer, default 0.1) output_format: Output format (geotiff or png) output_mode: "json" or "text"

Returns: Anomaly score map with detected anomaly regions

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": {
      "bbox": "<bbox>"
    },
    "name": "dem_detect_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
bboxYes
sourceNocop30
output_modeNojson
sensitivityNo
output_formatNogeotiff

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavioral traits: it names the algorithm, requires an optional ML extra ('pip install chuk-mcp-dem[ml]') that can fail, explains what sensitivity means, and describes the return payload. It omits cost/runtime characteristics for large bboxes and any indication of read-only or computational limits.

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-loaded with the one-line purpose, then method, then a dependency warning, then Args/Returns. Every sentence carries information, though the repeated 'output_format'/'output_mode' pair could be stated more tersely.

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?

For a 5-parameter tool with no annotations and no output schema, the definition covers purpose, method, prerequisites, all parameter meanings, and the shape of the result. The remaining gap is operational: nothing about expected runtime or bbox size constraints for an ML-based scan.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: bbox is pinned to EPSG:4326 with ordering given, source enumerates all six valid values, sensitivity gives range and directional meaning ('lower = fewer') plus the default, and output_format/output_mode list their accepted values. This is meaningfully more than the bare schema provides.

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 description states a specific verb+resource ('Detect terrain anomalies') and adds the mechanism ('Isolation Forest on slope/curvature/TRI feature vectors'), which separates it from the sibling plain-statistics tools like dem_slope. It stops short of explicitly contrasting with the closest sibling, dem_detect_features, so the boundary between 'anomalies' and 'features' is left for the agent to infer.

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?

Use cases are given ('catches anthropogenic features, data artefacts, or unusual geological features'), which implies when to reach for it. There is no statement of when not to use it and no named alternative despite dem_detect_features and dem_interpret being obvious candidates.

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