Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

fetch_road_network

Fetch OpenStreetMap road and optional waterway data for a bounding box, returning geometry and attributes to support EPANET network generation, with class filtering and paging.

Instructions

Fetch the road network for a geographic bounding box from OpenStreetMap (fixed public Overpass endpoint only — never Nominatim, never a caller-supplied URL) and return structured road geometry and attributes for future EPANET network generation: OSM way id, name, highway classification, full WGS84 geometry, length (m), and lanes/maxspeed/surface/oneway/bridge/tunnel where OSM has them (missing tags come back null). When waterwayTypes is set, matching linear waterway ways (river/stream/brook/canal/drain/ditch — for river-intake placement) are fetched in the same request and returned under waterways with way id, name, waterway class, geometry, length (m), and width/intermittent/tunnel. The bounding box is validated (ranges, min < max, per-axis span and total area caps) and the results are capped (maxResults, default 500, hard cap 5000) and pageable (offset; roads and waterways are paged independently with the same offset/maxResults). The Overpass query requests only the requested highway/waterway classes (roadTypes/waterwayTypes whitelists; roadTypes defaults to the standard drivable set, waterwayTypes is off unless given), carries a descriptive User-Agent, has a 30 s timeout and a 25 MB response cap, and fails closed on any Overpass error/timeout. Identical (bbox, roadTypes, waterwayTypes) requests are served from a short-lived in-memory cache. PURE READ: no network session, model, or file is touched — nothing is generated or optimized yet. Data © OpenStreetMap contributors, licensed ODbL (https://www.openstreetmap.org/copyright).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxLatYesNorth latitude (WGS84 degrees) of the bounding box.
maxLonYesEast longitude (WGS84 degrees) of the bounding box.
minLatYesSouth latitude (WGS84 degrees) of the bounding box.
minLonYesWest longitude (WGS84 degrees) of the bounding box.
offsetNoZero-based page offset; combine with maxResults to page through large areas (roads are ordered by OSM way id).
roadTypesNoHighway classes to fetch, e.g. ["residential", "tertiary"]. Defaults to the standard drivable set (motorway/trunk/primary/secondary/tertiary/unclassified/residential/living_street/road/service/track). Unknown values are rejected, never silently dropped.
maxResultsNoPage size (default 500, hard cap 5000); combine with offset to page through large areas.
waterwayTypesNoWaterway classes to fetch alongside the roads, e.g. ["river", "stream", "canal"] for river-intake placement. Linear channels only: river/stream/brook/canal/drain/ditch. When set, matching waterway ways are returned under `waterways` (way id, name, waterway class, geometry, length, width/intermittent/tunnel) in the same request. Unknown values are rejected, never silently dropped. When omitted, only roads are fetched.
Behavior5/5

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

No annotations are provided, so the description carries the full burden, and it delivers comprehensively. It discloses the fixed endpoint, the 30-second timeout, 25 MB response cap, fail-closed behavior on Overpass errors, bounding box validation and caps, result capping and pagination, caching of identical requests, and its pure-read nature affecting no state. It even includes licensing attribution. This is far beyond the minimum and leaves no major behavioral surprise.

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 long but every sentence carries distinct information—purpose, waterway addition, validation/caps, technical constraints, caching, licensing, and read-only nature. It is front-loaded with the core purpose and then layers details. The structure is logical and there is minimal redundancy. It could arguably be tightened, but for a tool of this complexity (8 parameters, dual output types, pagination), the length is justified. Only a minor reduction in verbosity would earn a 5.

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?

There is no output schema, so the description must fully explain what the tool returns, and it does: it specifies the exact attributes for roads (way id, name, highway type, geometry, length, and optional tags) and for waterways (way id, name, class, geometry, length, and width/intermittent/tunnel). It also covers error handling, defaults, paging, and caching. An agent has everything needed to invoke the tool correctly and interpret the result without any further reference.

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?

While schema description coverage is 100%, the description adds substantial semantics beyond the schema. It enumerates the default roadTypes set, states that unknown values are rejected (never silently dropped), specifies the allowed waterway types ('river/stream/brook/canal/drain/ditch'), clarifies that roads and waterways are paged independently with the same offset/maxResults, and describes the output structure under `roads` and `waterways`. This transforms the parameters from bare field names into actionable guidance on how to compose valid requests and interpret results.

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 starts with a specific verb ('Fetch') and resource ('road network for a geographic bounding box from OpenStreetMap'), and immediately distinguishes it from any other geocoding or URL-based fetching by stating the fixed Overpass endpoint and excluding Nominatim and caller-supplied URLs. It also clarifies the output is 'structured road geometry and attributes for future EPANET network generation', differentiating it from sibling tools like generate_network_from_bbox which would perform downstream generation. This makes the tool's scope 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?

The description clearly implies usage as a data-fetching step for later EPANET generation ('for future EPANET network generation') and emphasizes it is read-only ('PURE READ: no network session, model, or file is touched — nothing is generated or optimized yet'). While it does not explicitly name alternative tools or state 'when not to use', the context of the sibling list and the explicit read-only note makes its role clear. It stops short of an explicit routing instruction but is strong enough that an agent would know when to choose it.

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