Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

save_network

Persist edited EPANET network state to an INP or .net file, re-validating through the engine before writing. Allows later reload with load_network.

Instructions

Write the current state of a loaded network (including any set_* edits applied so far) to a file in the server's data directory: EPANET INP text (format 'inp', default) or the app's .net container (format 'net', which embeds the INP text — load_network reads both). The model is re-validated through the EPANET engine before writing, and existing files are not overwritten unless overwrite: true. Use this to persist edits: after saving, load_network can read the file back on a fresh session or server restart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format: 'inp' (EPANET text, the default) or 'net' (the app's .net container, which embeds the INP text).
networkIdYesThe network id returned by load_network.
overwriteNoAllow replacing an existing file. Default false: saving over an existing file is refused unless this is true.
outputFileNoFile name to write, relative to the server's data directory (absolute paths must still resolve inside it). Defaults to '<networkId>.inp' (or '<networkId>.net' for format 'net').
Behavior4/5

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

With no annotations provided, the description carries the full burden and covers key behaviors: re-validation through the EPANET engine before writing, refusal to overwrite existing files unless explicitly allowed, and the fact that it writes to the server's data directory. It does not mention failure modes (e.g., what happens if validation fails) or return values, but the stated traits are meaningful and useful.

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 three sentences and each adds value: the first defines the action and formats, the second describes validation and overwrite safety, and the third gives the primary use case. It is front-loaded with the core action and readably compact, though slightly longer than strictly necessary.

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 a tool with no output schema and moderate parameter count, the description covers the essential aspects: what it does, what formats, how safety is handled, and when to use it. It does not specify the return value (e.g., success message or file path) or error conditions, but for most agents the described behavior is sufficient to call it 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 input schema already has 100% coverage with descriptive comments for each parameter, so the description adds limited new meaning. It reinforces the format semantics (net embeds INP) and default file naming, but these are also present in the schema. The 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 ('write') and resource ('current state of a loaded network'), and clearly distinguishes it from the sibling load_network by emphasizing persistence. The two formats (inp and net) are explicitly named, leaving no ambiguity about what the tool does.

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 says 'Use this to persist edits' and explains that load_network can read the file back after a restart, which tells the agent exactly when to invoke it. It also cautions that existing files are not overwritten unless overwrite: true, providing a clear usage constraint with no alternative tool needed.

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