Skip to main content
Glama
Hydrata

Hydrata MCP Server

Official
by Hydrata

Register an uploaded terrain

finalize_terrain_upload

Registers an uploaded GeoTIFF as a terrain and starts its import workflow after a successful PUT, returning the terrain ID for status checks.

Instructions

Step 2 of a terrain import: register the PUT GeoTIFF as a Terrain and start the import.

Needs a launch-level agent key (the import can start AWS Batch); a read or draft key gets 403 AGENT_LEVEL_INSUFFICIENT — the user creates a launch key on the site's Agent keys page (/agents/).

Call this only after the presigned PUT returned 200. Creates the Terrain row (status creating) and queues the import chain — reproject to UTM, publish the layer + hillshade, style — which also seeds the project's six default boundary, friction, inflow, rainfall, building and mesh-region rows. Returns 202 with the terrain record; keep its id for get_terrain. A 400 UPLOAD_NOT_FOUND means no object is at staging_key: the PUT did not land (check its status code and Content-Type) — do not retry finalize until it has.

Input Schema

NameRequiredDescriptionDefault
titleNoTerrain title (default: the filename without .tif)
process_idNo`process_id` returned by presign_terrain_upload (pass it so the upload's progress record is reused; the API tolerates its absence)
project_idYesThe project ID
staging_keyYes`staging_key` returned by presign_terrain_upload
vertical_datum_declaredNoTASK-4061: the datum the user SAYS the heights are on: `ahd` (Australian Height Datum), `orthometric_egm2008` or `ellipsoid`. Pass it only when the user told you; if they did not, ask them, do not guess. Stored as the terrain's declared datum, which beats Hydrata's own inference. Omit when unknown.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / vertical_datum_declared
      Added value: +{
      +  "default": "",
      +  "description": "TASK-4061: the datum the user SAYS the heights are on: `ahd` (Australian Height Datum), `orthometric_egm2008` or `ellipsoid`. Pass it only when the user told you; if they did not, ask them, do not guess. Stored as the terrain's declared datum, which beats Hydrata's own inference. Omit when unknown.",
      +  "type": "string"
      +}
  2. First observedv0.2.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-idempotent and non-destructive. The description does correctly reinforce the non-idempotent trait by warning against retrying finalize, but most of its length is spent on auth requirements, side effects and error codes rather than on behaviors the annotations leave undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The step number and precondition are front-loaded, which is good, but the description runs long and stacks auth details, side effects, response codes and error remediation into dense paragraphs. The parenthetical about checking the PUT's status code and Content-Type is useful but sits inside a block of otherwise ancillary detail.

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 mutation that chains into a multi-stage import, it covers preconditions, side effects, auth, the 202 response and the one documented error branch, which is more than adequate alongside the existing output schema. It stops short of naming the alternative path (create_terrain_from_source) for importing terrain from a source rather than an upload.

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?

With 100% schema coverage the schema already defines every parameter, yet the description adds real meaning: staging_key is tied to a concrete failure mode (UPLOAD_NOT_FOUND when no object exists at that key) and the sequencing constraint on when finalize is safe. This makes the schema fields actionable rather than merely documented.

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?

The opening sentence names a specific verb and resource ('register the PUT GeoTIFF as a Terrain and start the import') and places it as 'Step 2 of a terrain import', which cleanly separates it from presign_terrain_upload (step 1) and create_terrain_from_source. An agent can identify this tool and its role in the pipeline without opening the schema.

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?

It gives an explicit precondition ('Call this only after the presigned PUT returned 200') and an explicit prohibition ('do not retry finalize until it has [landed]'), plus the exact failure branch (400 UPLOAD_NOT_FOUND means the PUT did not land). The 'Step 2' framing routes the agent to the preceding sibling in the sequence.

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