Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

set_junction_demand

Change a junction's base water demand in an EPANET model, with validation for node existence, value bounds, and model re-parse. Re-run simulation to update results.

Instructions

Change the base demand of a junction in a loaded network. The edit is validated against the EPANET engine before it is applied: the node must exist and be a junction, the value must be within realistic bounds, and the edited model must re-parse with the requested demand. Junctions whose demand is overridden by the [DEMANDS] section are rejected. Previous simulation results for the network are invalidated (they describe the old model) — re-run run_simulation afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
demandYesNew base demand in the model's flow units (e.g. LPS or GPM). A negative value represents flow into the network. Range: -1,000,000 to 1,000,000.
nodeIdYesId of the junction to change (use get_nodes to list junction ids).
networkIdYesThe network id returned by load_network.
Behavior5/5

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

Given no annotations are provided, the description carries full responsibility for behavioral disclosure. It clearly states that the edit is validated against the EPANET engine, what conditions cause rejection, that previous simulation results are invalidated, and that re-running run_simulation is required. This is comprehensive and goes beyond what typical descriptions offer.

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 purpose in the first sentence, followed by a second sentence that packs validation details, rejection conditions, and the simulation invalidation notice. Every phrase earns its place; there is no fluff or redundancy. The length is appropriate for the complexity of the operation.

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?

With no output schema and no annotations, the description covers all essential aspects an agent needs: the operation's validity checks, rejection scenarios, and the consequence that simulation results are stale. It even mentions the flow-unit context (inherited from schema) and practical next steps. Nothing critical is missing for correctly invoking and understanding the tool.

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 description coverage is 100%, so the schema already fully documents all three parameters (demand, nodeId, networkId), including ranges and references to other tools. The description adds no extra semantic information beyond what the schema provides. Baseline of 3 is appropriate since the schema does the heavy lifting.

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 ('Change'), resource ('base demand of a junction'), and context ('in a loaded network'). This clearly distinguishes it from siblings like set_demand_pattern (which sets demand patterns) and set_node_elevation (which changes elevation). The purpose is unambiguous and the tool's role is obvious.

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 does not explicitly name alternative tools, but it explains key usage conditions: the node must be a junction, junctions overridden by [DEMANDS] are rejected, and the simulation must be re-run afterward. This gives actionable guidance on when the tool can be used and its impacts. It doesn't explicitly say 'use set_demand_pattern for patterns' but the sibling context fills that gap. Slight deduction for lacking an explicit alternative comparison.

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