Wait for a terrain import
get_terrainPoll a terrain import until it is ready or errors, bounded by a timeout, and return outcome, status, phase, polls, elapsed time, and terrain record.
Instructions
Poll a terrain's import until it is ready (or error), bounded by timeout_seconds.
Returns outcome — exactly one of ready, error, timed_out, not_found
(the project has no terrain yet; an unknown terrain_id is an API 404 error
instead) — plus the last status seen (creating → styling → ready | error)
and phase (that status, or not_found; never empty),
polls, elapsed_seconds and the full terrain record (its gn_layer is
the published elevation dataset pk once ready). An import takes minutes to
tens of minutes (the SAME 32 MB 1 m DEM measured 4.5 min once and 26 min
once — the worker's S3 download speed dominates), so timed_out is normal
and NOT a failure: keep calling with the same arguments while status is
still creating/styling; several calls in a row is expected. error is
terminal — the import failed and no default input rows were seeded; upload
a corrected GeoTIFF as a new terrain.
A ready terrain whose import check found extrapolated ground (flat-sided triangles padding it out to its
edge, not surveyed ground) carries extrapolated_ground (state flagged or left_out) and a WARNING in
say_to_user: relay it. Only the person can leave that ground out of the drainage analysis, on the map.
ready is written by the import task; the project's default input rows
(Boundary 01, Friction 01, Inflow 01, Rainfall 01, Building 01,
MeshRegion 01, one GeoNode layer each) are seeded by the NEXT task in the
chain and appear over the following ~30 s. Poll the input-layer list until
it is non-empty before attaching your own layer to a default row.
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>"
},
"name": "get_terrain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID | |
| terrain_id | No | The terrain ID from finalize_terrain_upload. Omit to follow the project's newest terrain. | |
| timeout_seconds | No | How long this call keeps polling before it returns `timed_out` (default 110, ceiling 110: hydrata.com's edge cuts a longer silent call). 0 = one status read, no waiting. | |
| poll_interval_seconds | No | Seconds between polls (default 5) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||