Create a draft scenario
create_scenarioCreate a DRAFT scenario (no build, no run) and report its mesh-triangle estimate.
Instructions
Create a DRAFT scenario (no build, no run) and report its mesh-triangle estimate.
ASK FIRST: before you write any input, ask the person which approach they want (rain-on-grid, or an inflow hydrograph at a place they name), whether by 'hydrograph' they mean an inflow that drives the model or the flow they want out of the results, and for their design rainfall and losses; do not choose or source these yourself unless they ask you to.
POSTs /projects//scenarios/ with the write fields, then GETs the
scenario detail — the create response carries NO estimate; the detail's
mesh_triangle_count_estimate (+ _breakdown) does. Returns a compact
record (the same fields get_scenario answers with): id, name, the FK ids
as stored, resolution, duration, computed_status (created = no run
yet), the estimate and its breakdown, the price (quote_estimate:
the ONE pre-build price in USD, labelled an estimate), inflow_anchor_mismatch, and
http_status. Next step: build_scenario (which asks for
confirm=true above 100,000 triangles). Nothing is meshed or queued here.
Units: resolution — on the SCENARIO and on every MeshRegion FEATURE — is
a LENGTH in metres; ANUGA maximum_triangle_area = resolution²/2 (FloatField
default 100, not nullable; 0 makes the estimate None), and the estimate
prices both the same way. The smallest value becomes the raster
cell size. A MeshRegion feature must carry resolution_units = m (features
drawn in the map are marked automatically); an unmarked one makes the build
answer 422 MESH_REGION_UNITS_UNMARKED, naming the conversion an operator runs.
The server does NOT validate that the FK ids belong to project_id —
pass the row ids attach_input_layer / get_terrain returned for THIS
project. Every FK is nullable at create time, and the build fails later
on a scenario with no terrain, or with neither an inflow nor a rainfall.
A boundary whose row has no features (the default 'Boundary 01' before
attach_input_layer) is accepted here and refused by build_scenario. The
estimate is None when resolution is 0; an estimate of 0 with a real
boundary is a very coarse mesh, not an error.
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": "<name>",
"resolution": "<resolution>",
"duration": "<duration>"
},
"name": "create_scenario"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Scenario name | |
| inflow | No | Inflow row id (optional; the build needs an inflow OR a rainfall) | |
| culvert | No | Culvert row id (optional; attach_input_layer kind=culvert → row_id). The build refuses a culvert missing its shape, size or invert levels. | |
| sources | No | The documents this came from, so the engineer can click through to them: a list of {title, url, locator}, e.g. [{title: 'GHD 2015 Sullivans Creek Flood Study', url: 'https://...', locator: 'Table 5-2'}]. Limits: title (1-200 characters) and url (http or https, at most 2000 characters) are required; locator (a page or table, e.g. 'p. 42' or 'Table 5-2') is optional, at most 100 characters. At most 20 entries. Pass it beside the method whenever you cite a document. | |
| terrain | No | Terrain id (get_terrain → terrain.id); the build fails without one | |
| boundary | No | Boundary row id (attach_input_layer kind=boundary → row_id) | |
| building | No | Building row id (optional) | |
| duration | Yes | Simulation duration in seconds (e.g. 43200 = 12 h) | |
| friction | No | Friction row id (optional) | |
| rainfall | No | Rainfall row id (optional; the build needs an inflow OR a rainfall) | |
| structure | No | Deprecated alias of `building`; ignored when `building` is given. | |
| project_id | Yes | The project ID | |
| resolution | Yes | Mesh resolution as a LENGTH in metres (ANUGA maximum_triangle_area = resolution²/2). Coarser (larger) = fewer triangles: on a ~13 km² boundary 36-40 m gives ~16-20k triangles, 10 m ~255k, 1 m ~25M (refused by the API). | |
| description | No | Free-text description (optional) | |
| mesh_region | No | MeshRegion row id (optional): finer meshing inside its polygons, each feature's `resolution` a LENGTH in metres (see the units note). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||