Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

generate_network_from_bbox

Build a water network from OSM roads in a bounding box: derive junctions/pipes from streets, place reservoir at river, sample DEM elevations, and produce a validated EPANET model.

Instructions

Build a water network automatically from real streets — the one-call GIS layout (roadmap Phase 4, native tool). Fetch OSM highway+waterway ways for a bbox (or reuse a saved extract via osmExtract/osmFile), derive the junction/pipe skeleton: the connected component containing the road nearest the river, dead-end spurs pruned (minDeadEndM, default 30 m), roads decimated to ~spacingM (default 150 m) junction spacing, and pipe diameters from the road class as HDPE (PE100) INTERNAL bores at SDR 11 — e.g. trunk 290, primary 258, secondary 205, tertiary 164, residential 90, service 74 mm — with the default pipe material HDPE (Hazen-Williams C = 130). The reservoir is placed at the nearest OSM waterway point to river and connected to the nearest junction by an intake pipe; ground elevations are sampled from the bundled IFSAR 10 m DEM (never guessed, same fail-closed contract as create_network elevationSource). The resulting model is engine-validated and becomes a normal session (networkId): run_simulation, assign_demands, optimize_network and save_network all work on it immediately. The bbox mode calls the public Overpass API (fixed endpoint, 30 s timeout, 25 MB response cap); pass osmExtract or osmFile instead to work from a saved extract with no network. Provide exactly one of bbox / osmExtract / osmFile, plus river and a positive reservoirHead (the intake/pump discharge head — a design input, never guessed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNoBounding box (WGS84) to fetch OSM highway+waterway ways from Overpass. Provide exactly one of bbox / osmExtract / osmFile.
riverYesThe water source: the reservoir is placed at the nearest OSM waterway point to this coordinate (falling back to the coordinate itself when the extract has no waterways).
titleNoModel title; defaults to 'Auto-layout network'.
osmFileNoA saved OSM extract JSON file (with an 'elements' array), relative to the server data directory. Provide exactly one of bbox / osmExtract / osmFile.
spacingMNoTarget junction spacing along roads (m); default 150. Lower = more junctions, higher = a coarser skeleton.
osmExtractNoInline OSM elements (Overpass 'out body' JSON) to lay out instead of fetching live. Provide exactly one of bbox / osmExtract / osmFile.
minDeadEndMNoDead-end chains shorter than this (m) are pruned; default 30. 0 keeps every dead-end branch.
reservoirHeadYesReservoir head in the model's length units (e.g. meters) — the intake/pump discharge head. Required; never guessed.
Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure, and it does so thoroughly. It details the entire pipeline: OSM fetch, skeleton derivation, dead-end pruning, road decimation, deterministic diameter mapping (with explicit values), reservoir placement, DEM sampling that never guesses, engine validation, and immediate post-processing availability. It also discloses network constraints (Overpass endpoint, timeout, response cap) and the never-guessed contracts for elevation and reservoir head.

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 a single dense paragraph, but every sentence carries meaningful information. It is front-loaded with the core purpose and then expands into operational details and constraints. While lengthy, it avoids redundancy and is well-organized with a logical flow from inputs to processing to outputs. It is not overly terse, but the complexity justifies the length.

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?

Given 8 parameters, nested objects, and no output schema, the description is remarkably complete. It specifies parameter defaults, behavior, external dependencies, and the resulting model lifecycle (networkId, immediate support for run_simulation, assign_demands, etc.). It also covers error-prone aspects like the requirement of exactly one input mode and the fail-closed elevation contract. An agent would be well-equipped to invoke this tool correctly without additional lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds substantial semantic value beyond the schema. It explains the effect of each parameter in context: spacingM controls junction density, minDeadEndM prunes short branches, river guides reservoir placement to the nearest waterway, and reservoirHead is a design input that must be positive. For nested objects like osmExtract and osmFile, it clarifies their relationship to bbox and the offline workflow. This goes well beyond the raw schema definitions.

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 a clear, specific verb and resource: 'Build a water network automatically from real streets — the one-call GIS layout.' It distinguishes itself from siblings like fetch_road_network and create_network by positioning as the consolidated layout tool and explicitly noting it is the Phase 4 native tool. The purpose is unmistakable.

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?

It explicitly instructs to provide exactly one of bbox / osmExtract / osmFile along with river and reservoirHead, and explains the trade-off between live Overpass calls and saved extracts. It also references the fail-closed contract shared with create_network, giving context on when this tool behaves similarly. It does not explicitly list exclusions versus siblings, but the guidance is strong enough for an agent to choose appropriately.

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