Attach an uploaded layer as a project input
attach_input_layerAttach 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
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | 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). | |
| project_id | Yes | The project ID | |
| execution_id | Yes | `execution_id` returned by your multipart POST to <origin>/api/v2/uploads/upload/ | |
| timeout_seconds | No | How 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_seconds | No | Seconds between polls (default 5) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||