Skip to main content
Glama
Hydrata MCP Server

Hydrata MCP Server

Official
by Hydrata

Read the streams of a terrain and the corridor round them

get_stream_corridor
Read-onlyIdempotent

Retrieve a terrain's streams and their widened corridor from kept drainage analysis, returning a GeoJSON polygon to use as a mesh region for finer stream meshing.

Instructions

Read the streams of a terrain and the corridor round them, from the terrain's kept drainage analysis.

A stream is where at least threshold_ha of ground drains through. The corridor is the streams widened by half_width_m each side: a polygon to write as a mesh_region (write_input_layer) so the mesh is finer along the streams. Use it instead of working streams out yourself, and pass its authored_method when you write the corridor. Ask the user for the mesh region's resolution (a triangle edge length in metres, never finer than the terrain's resolution_m).

It starts nothing (no line run, no drainage analysis, nothing written): a terrain with no kept drainage analysis is refused in words. Returns the corridor (a GeoJSON Feature in lon/lat), its area, the streams largest first (drainage area and length; their lines with include_stream_lines), the grid read, whether the drainage analysis is out of date (with the sentence to relay) and authored_method. Read-only.

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": {
      "project_id": "<project_id>",
      "terrain_id": "<terrain_id>",
      "threshold_ha": "<threshold_ha>"
    },
    "name": "get_stream_corridor"
  }
}

Input Schema

NameRequiredDescriptionDefault
bboxNoKeep the streams inside this box: [west, south, east, north] in degrees (lon/lat).
gridNo'full' (high resolution) or 'quick' (the fast screen's coarser grid). Leave it out for the finest kept.
project_idYesThe project ID
terrain_idYesThe terrain whose streams to read (a delineation's `line.terrain_id`, or get_terrain)
half_width_mNoHow far the corridor reaches each side of a stream, in metres (0 to 1000; default 40). 0 gives the streams with no corridor.
threshold_haYesWhere a stream starts: the drainage area in hectares that must drain through a cell for it to be a stream (0.1 to 1,000,000). Larger keeps only the bigger streams. Choose it with the user for what the model needs.
delineation_idNoKeep the streams inside this line's catchments (a line on this terrain). Or give bbox; leave both out for the whole terrain.
include_stream_linesNoFalse (default): each stream as its drainage area and length only. True: with its line in lon/lat too.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.6

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, so the description's job is to add the parts annotations can't: it discloses the dependency on an existing kept drainage analysis with a verbal refusal, no side effects ('starts nothing'), the returned fields including staleness flag and a sentence to relay, and the authored_method provenance. Doesn't discuss rate limits or sizes, but the behavior profile is rich.

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 purpose, then definitions, then intended workflow (write as mesh_region, pass authored_method), then return values. Dense but each paragraph earns its place; a few clauses, such as repeating the corridor definition, could be trimmed.

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?

Given an output schema exists, return details are partly redundant, but the description still covers the dependency, refusal, and downstream write workflow that the schema can't. Covers the complexity of an 8-parameter, workflow-coupled read tool well.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented in the schema; the description adds the meaning of threshold_ha and half_width_m conceptually, but doesn't add syntax or format detail beyond the schema's own descriptions or the defaults/ranges it repeats.

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+resource: reads streams and a corridor polygon for a terrain from the kept drainage analysis. Definitions of 'stream' (threshold_ha drainage) and 'corridor' (streams widened by half_width_m) are given, so the agent knows exactly what's returned and how it differs from a generic terrain read.

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

Usage Guidelines5/5

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

Explicitly says 'Use it instead of working streams out yourself', names the downstream sibling (write_input_layer) and what to pass to it (authored_method, mesh_region), and tells the agent to ask the user for the mesh resolution. It also notes the refusal case (no kept drainage analysis).

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