Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

set_valve_setting

Change a valve's pressure, flow, or loss coefficient in an EPANET network. Validates the edit against the engine before applying; invalidates stale simulation results.

Instructions

Change the setting of a valve (PRV/PSV/PBV pressure, FCV flow, TCV loss coefficient) in a loaded network. The edit is validated against the EPANET engine before it is applied: the link must exist and be a valve, the value must be within realistic bounds for the valve type and the model's units, and the edited model must re-parse with the requested setting. GPV valves are rejected (their setting is a headloss curve id). Previous simulation results for the network are invalidated (they describe the old model) — re-run run_simulation afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkIdYesId of the valve to change (use get_links to list valve ids and their current settings).
settingYesNew valve setting in the valve type's units: PRV/PSV/PBV a pressure (m or psi), FCV a flow (e.g. LPS), TCV a dimensionless loss coefficient. Never negative. GPV valves are not supported (their setting is a headloss curve id).
networkIdYesThe network id returned by load_network.
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden. It discloses that the edit is validated against EPANET (link must exist and be a valve, value within realistic bounds, model re-parse), that GPV valves are rejected, and that prior simulation results are invalidated with a directive to re-run run_simulation. This is comprehensive and transparent.

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 two sentences: the first states the purpose with valve types, the second details validation and side effects. It is front-loaded with the core action, and every clause adds value without redundancy. Highly efficient.

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

Completeness5/5

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

For a mutation tool, the description covers prerequisites (loaded network), validation constraints, rejection case (GPV), and a required follow-up (re-run simulation). Combined with the rich parameter schema, there is no missing critical information an agent needs to invoke and use 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 descriptions for all three parameters are already thorough (e.g., setting explains units per valve type and the GPV exclusion; linkId references get_links; networkId references load_network). With 100% schema coverage, the description adds little parameter-specific meaning beyond reinforcing the validation and invalidation behavior. Baseline 3 is appropriate.

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 clearly states the verb and resource: 'Change the setting of a valve' and explicitly enumerates valve types and the corresponding setting meaning (PRV/PSV/PBV pressure, FCV flow, TCV loss coefficient). This distinguishes it from siblings like set_pipe_diameter or set_pump_speed, and the initial sentence immediately conveys scope.

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 clear context: it operates on a loaded network, validates against EPANET, and notes that previous simulation results are invalidated, implying when to use it. It also explicitly excludes GPV valves, giving a 'when not to use' condition. However, it does not explicitly contrast with add_valve (adding a valve vs. editing an existing one) or mention alternative tools for other edit types.

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