create_contamination_event
Inject a contaminant at a specified network node and time window, then simulate the resulting water-quality scenario on a cloned EPANET network.
Instructions
Inject a contaminant at a node for a specified time window and simulate.
A clone of the source network is created. Quality type is set to CHEM automatically.
Args:
network_id: Source network id.
source_node_id: Node where the contaminant is introduced.
concentration: Concentration in mg/L (or model quality units).
start_time_s: Injection start time in seconds.
end_time_s: Injection end time in seconds.
source_type: "CONCEN", "MASS", "FLOWPACED", or
"SETPOINT".
scenario_id: Id for the cloned scenario session.
run_simulation: Run a full simulation after applying changes.
chemical_name: Chemical species name.
units: Chemical quality units.
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": {
"network_id": "<network_id>",
"source_node_id": "<source_node_id>",
"concentration": "<concentration>",
"start_time_s": "<start_time_s>",
"end_time_s": "<end_time_s>"
},
"name": "create_contamination_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | mg/L | |
| end_time_s | Yes | ||
| network_id | Yes | ||
| scenario_id | No | ||
| source_type | No | CONCEN | |
| start_time_s | Yes | ||
| chemical_name | No | Contaminant | |
| concentration | Yes | ||
| run_simulation | No | ||
| source_node_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |