Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

create_network

Build a hydraulic model from scratch by supplying junctions, reservoirs, tanks, and pipes; validates the network and creates a session for simulation and editing.

Instructions

Build a new hydraulic model from scratch — no file needed. Supply junctions, reservoirs (e.g. a river intake) and optional tanks with elevations, plus pipes with lengths and diameters; optional x/y coordinates per node are written into a [COORDINATES] section so the model has real geometry. The spec is validated (unique ids, real pipe endpoints, realistic bounds) and the generated INP is re-opened through the EPANET engine: it must parse with exactly the requested node/link counts. Solvability is reported (solves: true/false) but not enforced, so a skeleton network can be created and filled in later. Creates a normal session: run_simulation, set_* edits, optimize_network and save_network all work on it immediately. This is the first step of the GIS workflow; for an auto-layout from real streets use generate_network_from_bbox (Phase 4) instead — see mcp_gis_roadmap.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipesYesPipes: id, two existing node ids, length, diameter (mm for SI, inches for US), optional roughness/minor-loss/status.
tanksNoOptional tanks: id, bottom elevation, water levels above it, diameter, optional min volume and x/y.
titleNoModel title; defaults to 'Generated network'.
unitsNoFlow units for the model; defaults to LPS. US units (GPM/CFS/MGD/IMGD/AFD) use feet/inches and psi; SI units use metres/mm.
headlossNoHeadloss formula; defaults to H-W (Hazen-Williams). Affects the default pipe roughness: the default pipe material is HDPE, so 130 (H-W/C-M) or 0.25 mm (D-W).
junctionsYesJunctions: id, ground elevation (m or ft — optional when sampled from IFSAR via x/y), optional base demand (flow units) and projected x/y coordinates.
reservoirsYesReservoirs (e.g. a river intake): id, fixed head (m or ft), optional x/y coordinates.
elevationSourceNoGround-elevation source. Defaults to the bundled IFSAR 10 m DEM: any junction without an explicit elevation is sampled from it using the junction's x/y coordinates, so no elevation guessing is the default. Set type ifsar-10m with coordinates wgs84 (default) or { utmZone }.
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 reveals that the spec is validated (unique ids, real endpoints, bounds), that the INP is re-opened through the EPANET engine and must parse with exact counts, that solvability is reported but not enforced (allowing skeleton networks), and that it creates a normal session enabling other tools to operate immediately. These are concrete behavioral traits beyond the schema, giving the agent a realistic model of execution and side effects.

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 dense but every sentence contributes: purpose, required inputs, validation behavior, solvability semantics, session integration, and routing to the alternative. The key constraint (first step of GIS workflow, use generate_network_from_bbox instead) is front-loaded near the end but clearly separated. It is appropriately sized for the tool's complexity, with no filler.

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

Completeness3/5

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

The tool is complex (8 parameters, nested objects, multiple behavioral details), and there is no output schema. The description explains many behaviors but does not explicitly state the return value — it only implies a session by saying 'Creates a normal session.' It also doesn't describe what happens on validation failure (beyond implying rejection). Given the complexity and absent output schema, an agent might be unsure what it gets back (e.g., a session ID) and how to use it. This is a real gap, so 3 is appropriate.

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 100%, so the baseline is 3. The description adds some value beyond the schema: it mentions that optional x/y coordinates are written into a [COORDINATES] section, clarifies that reservoirs are e.g. a river intake, and explains the elevation sampling default indirectly. It doesn't re-document each parameter but reinforces key relationships (e.g., pipes with lengths/diameters) and the purpose of geometry. This is a modest improvement over the schema alone.

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 opens with 'Build a new hydraulic model from scratch' — a specific verb and resource that immediately conveys the action and object. It distinguishes itself from the sibling generate_network_from_bbox by explicitly stating it creates a model from user-supplied components rather than auto-layout from streets. The reference to the GIS workflow positions it clearly as the first step.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'This is the first step of the GIS workflow.' It also gives a direct alternative and condition: 'for an auto-layout from real streets use generate_network_from_bbox (Phase 4) instead.' This is unambiguous routing with a clear exclusion, matching the top-tier example.

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