Skip to main content
Glama

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

NameRequiredDescriptionDefault
unitsNomg/L
end_time_sYes
network_idYes
scenario_idNo
source_typeNoCONCEN
start_time_sYes
chemical_nameNoContaminant
concentrationYes
run_simulationNo
source_node_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / chemical_name
      Added value: +{
      +  "default": "Contaminant",
      +  "title": "Chemical Name",
      +  "type": "string"
      +}
    • addedInput schema / properties / units
      Added value: +{
      +  "default": "mg/L",
      +  "title": "Units",
      +  "type": "string"
      +}
  2. First observedv0.1.2

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It usefully discloses that a clone of the source network is created and that quality type is set to CHEM automatically, but it does not cover permissions, reversibility, side effects on the source network, or what happens when scenario_id is omitted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action, then uses a clean Args list for the 10 parameters. Every sentence contributes useful information without unnecessary wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation/simulation tool with no annotations, the description covers purpose, key side effects, and all parameters. An output schema exists, so return values need not be explained; remaining gaps are prerequisites and alternative-tool guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does by listing all 10 parameters with meanings, units for concentration, time units for start/end, and enum values for source_type. It does not state defaults or optionality for scenario_id, run_simulation, chemical_name, or units, but overall it adds substantial meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: "Inject a contaminant at a node for a specified time window and simulate." It also clarifies the clone behavior and automatic CHEM quality type, making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does but gives no explicit guidance on when to use it versus alternatives such as create_leakage_event or other scenario tools. There are no when-not conditions or prerequisite notes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.