Skip to main content
Glama

Hydrata - ANUGA Flood Simulation

Create a draft scenario

create_scenario

Create a DRAFT scenario (no build, no run) and report its mesh-triangle estimate.

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 (compute_cost_estimate in USD, vcpu_hours_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 (TASK-3186). 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesScenario name
inflowNoInflow row id (optional; the build needs an inflow OR a rainfall)
terrainNoTerrain id (get_terrain → terrain.id); the build fails without one
boundaryNoBoundary row id (attach_input_layer kind=boundary → row_id)
buildingNoBuilding row id (optional)
durationYesSimulation duration in seconds (e.g. 43200 = 12 h)
frictionNoFriction row id (optional)
rainfallNoRainfall row id (optional; the build needs an inflow OR a rainfall)
structureNoDeprecated alias of `building` (TASK-3586); ignored when `building` is given.
project_idYesThe project ID
resolutionYesMesh 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).
descriptionNoFree-text description (optional)
mesh_regionNoMeshRegion row id (optional): finer meshing inside its polygons, each feature's `resolution` a LENGTH in metres (see the units note).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / building
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Building row id (optional)"
      +}
    • changedInput schema / properties / structure / description
      Previous value: -"Structure row id (optional)"New value: +"Deprecated alias of `building` (TASK-3586); ignored when `building` is given."
  2. Changed4 schema fields changed
    • changedInput schema / properties / mesh_region / description
      Previous value: -"MeshRegion row id (optional). Leave UNSET unless you want the regions' finer meshing — see the units note: they mesh ~15x more than estimated."New value: +"MeshRegion row id (optional): finer meshing inside its polygons, each feature's `resolution` a LENGTH in metres (see the units note)."
    • 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.