Skip to main content
Glama

create_leakage_event

Simulate a pipe burst by adding a leakage emitter at the pipe midpoint in a cloned EPANET network, leaving the source unchanged, and optionally run the simulation to assess impact.

Instructions

Simulate a pipe burst by adding a leakage emitter at the pipe midpoint.

A clone of the source network is created; the original is unchanged. The burst pipe is split into two halves and a midpoint junction node with an emitter is added.

Args: network_id: Source network id. pipe_id: Id of the pipe that bursts. leak_fraction: Optional fraction of baseline mean pipe flow (0.0–1.0). scenario_id: Id for the cloned scenario session. run_simulation: Run a full simulation after applying changes. target_leak_flow: Optional target flow in the model's flow units. reference_pressure: Pressure at which the target flow applies. emitter_exponent: Pressure exponent; defaults to the model option.

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>",
      "pipe_id": "<pipe_id>"
    },
    "name": "create_leakage_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
pipe_idYes
network_idYes
scenario_idNo
leak_fractionNo
run_simulationNo
emitter_exponentNo
target_leak_flowNo
reference_pressureNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.0
    • addedInput schema / properties / emitter_exponent
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Emitter Exponent"
      +}
    • addedInput schema / properties / leak_fraction / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / leak_fraction / default
      Added value: +null
    • removedInput schema / properties / leak_fraction / type
      Removed value: -"number"
    • addedInput schema / properties / reference_pressure
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reference Pressure"
      +}
    • addedInput schema / properties / target_leak_flow
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Target Leak Flow"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "network_id",
      -  "pipe_id",
      -  "leak_fraction"
      -]New value: +[
      +  "network_id",
      +  "pipe_id"
      +]
  2. First observedv0.1.2

TDQS

A3.5/5.0
Behavior4/5

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

With zero annotations, the description carries the full burden and does well: it discloses that a clone is created and the original is unchanged, and that the pipe is split into halves with a new junction node. It omits error behavior (invalid pipe_id, scenario_id collisions), idempotency, and resource cost of run_simulation=true.

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

Conciseness4/5

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

Purpose and side effects are front-loaded in three short sentences, followed by a scannable parameter list. The Args block necessarily mirrors the schema since coverage is 0%, so it earns its space, though 'Source network id.' and 'Id of the pipe that bursts.' add little.

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 an 8-parameter mutation tool with no annotations, the description covers the core mutation semantics and every parameter at least briefly; the output schema covers return values. The remaining gap is the parameter interplay and failure modes, which matters for a tool that clones a network session.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate, and its Args block does add real meaning: the 0.0–1.0 range for leak_fraction, units for target_leak_flow, the role of reference_pressure, and that emitter_exponent defaults to the model option. However, the relationship between leak_fraction and target_leak_flow (mutually exclusive? precedence?) and the semantics of scenario_id reuse are left unexplained.

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

Purpose4/5

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

The opening sentence gives a concrete verb and resource: 'Simulate a pipe burst by adding a leakage emitter at the pipe midpoint.' The mechanics (clone, split pipe, midpoint junction) make it unmistakably distinct from siblings like create_contamination_event or create_demand_perturbation, though no sibling is named explicitly.

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?

There is no when-to-use guidance, no prerequisites (e.g. must the network be loaded first?), and no steering among the scenario-creating siblings. Critically, the description never says when to use leak_fraction vs target_leak_flow, which is the main decision an agent faces here.

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