Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

add_tank

Add a storage tank with a connector pipe to an existing junction or reservoir to boost pressure, then validate the edited EPANET model for hydraulic solvability and data integrity.

Instructions

Add a storage tank at a strategic location: a new tank node plus a connector pipe attaching it to an existing node — a junction (e.g. a low-pressure junction that needs pressure support) or, optionally, a reservoir. The edit is validated against the EPANET engine before it is applied — unique ids, realistic geometry, the edited model must re-parse with the tank and pipe present, node/link counts must increase by exactly one each, and the edited model must still solve hydraulically if the base model did. Previous simulation results are invalidated; re-run run_simulation to see the effect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipeIdYesNew unique pipe id connecting the junction to the tank (1-31 characters, no spaces and none of: + - . ;).
tankIdYesNew unique tank id (1-31 characters, no spaces and none of: + - . ;).
diameterYesTank diameter (model's length units).
maxLevelYesMaximum water level above the tank bottom (model's units); must exceed minLevel.
minLevelYesMinimum water level above the tank bottom (model's units).
elevationYesTank bottom elevation in the model's units (m for SI, ft for US).
minVolumeNoMinimum volume; defaults to 0.
networkIdYesThe network id returned by load_network.
junctionIdNoId of an existing junction to attach the tank to (use get_nodes to list junction ids; a low-pressure junction is a good candidate). Provide exactly one of junctionId or reservoirId.
pipeLengthYesLength of the connector pipe (model's length units).
reservoirIdNoId of an existing reservoir to attach the tank to instead of a junction (use get_nodes to list reservoir ids). Provide exactly one of junctionId or reservoirId.
initialLevelYesInitial water level above the tank bottom (model's units).
pipeDiameterYesDiameter of the connector pipe (mm for SI models, inches for US-unit models).
pipeRoughnessNoRoughness of the connector pipe (default 100 for H-W/C-M models, 0.25 for D-W models).
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states that the edit is validated against the EPANET engine (checking unique ids, realistic geometry, re-parse, count increments, and hydraulic solvability), that previous simulation results are invalidated, and that run_simulation must be re-run. This is thorough and goes beyond a simple side-effect statement, giving the agent a clear model of outcomes and failure risks.

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?

The description is two sentences, front-loading the purpose and then delivering validation and side-effect details. It is structured logically and each sentence earns its place. While it is slightly verbose in listing validation specifics, that information is valuable and not redundant. It avoids filler and would benefit only from trimming minor redundancy in the validation list.

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?

Given the complexity (14 parameters, no output schema, no annotations), the description covers the core action, the validation process, and the invalidation of previous results. It does not specify the exact return value or error messages, but those are not expected without an output schema. It also does not mention prerequisites beyond requiring networkId and a target node, though these are in the schema. Overall, it is sufficiently complete for an agent to call the tool correctly.

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?

The schema already documents all 14 parameters at 100% coverage, so the baseline is 3. The description adds minimal parameter-specific semantics: it clarifies that the tool adds a tank and pipe together, and implies that pipe-related parameters refer to the connector pipe, but it does not provide additional format or constraint details beyond what the schema already states. It does not compensate for any coverage gaps because none exist.

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 ('Add'), a concrete resource ('a storage tank'), and explains the mechanism: a new tank node plus a connector pipe attached to an existing junction or reservoir. This clearly distinguishes it from sibling tools like add_valve (valve) and remove_tank (removal). The purpose is unambiguous and immediately actionable.

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

Usage Guidelines4/5

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

The description provides usage context by suggesting a junction that needs pressure support ('a low-pressure junction that needs pressure support') and mentions the alternative of a reservoir. It does not explicitly exclude alternatives or contrast with other modification tools, but the stated use case is clear enough for an agent to decide when to invoke this tool. A brief 'when not to use' would elevate it further.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hjlrosales/EPAnet-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server