Skip to main content
Glama

Hydrata - ANUGA Flood Simulation

Attach an uploaded layer as a project input

attach_input_layer
Idempotent

Attach a GeoJSON you uploaded to GeoNode as the project's boundary, friction, inflow, rainfall, building or mesh_region layer.

The agent moves the bytes: first upload the GeoJSON yourself, with the same credential, to GeoNode's upload endpoint at the site origin:

curl -sS -u <user>:<password> -F "base_file=@/path/rainfall.geojson" https://<site>/api/v2/uploads/upload/

→ JSON with execution_id. Then call this tool with it. The tool polls GET /api/v2/resource-service/execution-status/ (bounded by timeout_seconds; statuses ready → running → finished | failed), reads the new dataset's pk, and PATCHes it onto the project's DEFAULT row of that kind ('Boundary 01' … 'MeshRegion 01' — the six rows the terrain import seeds ~30 s after get_terrain reports ready; if the list is still empty the tool says so: run finalize_terrain_upload / wait for get_terrain first).

outcome is exactly one of: attached (row_id, gn_layer, dataset_pk, dataset_alternate — the WFS typename — and every row id seen); timed_out (the import is still running: call again with the same arguments); upload_failed (the execution record, incl. its log, is returned verbatim — fix the file and upload again); no_default_row; no_dataset (finished but no resource was recorded). The PATCH is refused with a 400 if the dataset is not owned by you.

Refused, with no request made: kind breakline and kind culvert — no REST create path exists for either at HEAD (TASK-3040 AC6), and culvert flow is not conveyed by run_anuga, so attaching one would only pretend. Also refused without a request: an execution_id that is not the UUID the upload returned. One GeoJSON per kind: all of a kind's features travel in that one file. A rainfall polygon names its gauge in its data property — create that gauge with create_time_series under the exact same name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich input the uploaded layer is: boundary, friction, inflow, rainfall, building or mesh_region ('structure' is a deprecated alias of building). breakline and culvert are refused (see below).
project_idYesThe project ID
execution_idYes`execution_id` returned by your multipart POST to <origin>/api/v2/uploads/upload/
timeout_secondsNoHow long this call keeps polling the upload before it returns `timed_out` (default 240, ceiling 280 — the prod /mcp/ proxy cuts a call at 300 s). 0 = one status read, no waiting.
poll_interval_secondsNoSeconds between polls (default 5)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / kind / description
      Previous value: -"Which input the uploaded layer is: boundary, friction, inflow, rainfall, structure or mesh_region. breakline and culvert are refused (see below)."New value: +"Which input the uploaded layer is: boundary, friction, inflow, rainfall, building or mesh_region ('structure' is a deprecated alias of building). breakline and culvert are refused (see below)."
  2. Changed3 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.