Skip to main content
Glama

dem_watershed

Computes watershed flow accumulation for a bounding box using the D8 algorithm, identifying streams and drainage channels for hydrological analysis and flood risk assessment.

Instructions

Compute watershed flow accumulation for a bounding box.

Uses the D8 algorithm to compute flow direction and accumulation. High accumulation values indicate streams and drainage channels. Useful for hydrological analysis and flood risk assessment.

Args: bbox: Bounding box [west, south, east, north] in EPSG:4326 source: DEM source (cop30, cop90, srtm, aster, 3dep, fabdem) output_format: Output format (geotiff or png) output_mode: "json" or "text"

Returns: Flow accumulation raster artifact with value range in cells

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_watershed"
  }
}

Input Schema

NameRequiredDescriptionDefault
bboxYes
sourceNocop30
output_modeNojson
output_formatNogeotiff

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does well on the algorithmic side (D8 flow direction then accumulation, interpretation of values in cells) but says nothing about cost, execution time, source-resolution tradeoffs, or how the resulting artifact is delivered, which are the behaviors an agent most needs for a potentially heavy compute call.

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 core action, followed by a short method note and a compact Args/Returns block; every line carries information. The only mild redundancy is restating 'compute flow direction and accumulation' after the title line already establishes the computation.

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?

There is no output schema, but the Returns section covers the essential contract (raster artifact plus cell-value range), and the four parameters are all documented. Missing pieces are secondary: how the artifact is referenced/returned, and any guidance on expected output size or source resolution tradeoffs for a compute-heavy tool.

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%, so the description must compensate, and it largely does: it gives bbox ordering and CRS (EPSG:4326), enumerates the six valid DEM sources, and lists the accepted output_format and output_mode values that the bare schema leaves as unconstrained strings. It falls short of 5 by omitting the defaults (cop30, geotiff, json) and any bbox extent/size constraints.

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 opening line names a specific verb and resource ('Compute watershed flow accumulation') and the following lines add the method (D8 flow direction/accumulation) and the interpretive meaning of high values. It is clearly distinct from siblings like dem_slope or dem_aspect, though it never explicitly names or contrasts an alternative tool.

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?

It offers use cases ('hydrological analysis and flood risk assessment') and notes what high accumulation values signify, which implies when the tool is appropriate. However, there is no explicit when-to-use vs. when-not guidance, no prerequisites (e.g., data availability, area limits), and no routing to a sibling tool.

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