Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

recommend_diameter

Selects standard pipe diameters that meet a specified flow rate and velocity window, returning material-specific sizes with calculated velocity and Reynolds number.

Instructions

Recommend standard pipe diameters for a given flow rate and target velocity range. Given a design flow (in any EPANET flow unit) and an acceptable velocity window, computes the ideal inner diameter using Q = v × πd²/4, then returns every standard pipe size (from HDPE, PVC, ductile iron, or steel in medium/Sch 40/Sch 80 variants) whose inner diameter produces a velocity within the range. Each recommendation includes the resulting velocity, an approximate Reynolds number (for turbulence check), and the standard it comes from. Use presets (distribution, transmission, service, suction) for typical velocity ranges, or specify custom min/max. Pipe diameters returned are the inner-diameter values to use with set_pipe_diameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
presetNoVelocity-range preset: distribution (0.6–1.5 m/s, water mains), transmission (1.0–2.5 m/s, large mains), service (0.5–1.2 m/s, service connections), suction (0.8–1.5 m/s, pump suction). 'custom' (default) uses minVelocity/maxVelocity.
flowRateYesDesign flow rate in the given flow units (e.g. 10 for 10 LPS, 150 for 150 GPM).
materialNoRestrict recommendations to a single material. Omit to search all materials.
flowUnitsYesFlow units matching EPANET's [OPTIONS] Units. SI: LPS (L/s), LPM (L/min), MLD (ML/d), CMH (m³/h), CMD (m³/d). US: GPM, CFS (ft³/s), MGD, IMGD, AFD.
maxVelocityNoMaximum acceptable velocity in m/s (default 2.0). Above this, erosion and water-hammer risk increases.
minVelocityNoMinimum acceptable velocity in m/s (default 0.5). Below this, sedimentation risk increases. For US flow units this is still m/s — the tool converts internally.
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 of behavioral disclosure. It explains the computation method (using Q = v × πd²/4), the filtering logic (returns every standard size whose inner diameter produces a velocity within the range), and the output content (resulting velocity, Reynolds number, standard). It also clarifies that returned diameters are inner-diameter values to be used with set_pipe_diameter. It does not disclose potential edge cases (e.g., no matches) or the accuracy of the Reynolds approximation, but the core behavior is transparently described. Slight deduction for not mentioning limitations.

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 concise, around five sentences, with the core purpose front-loaded. Each sentence adds value: it explains the input, the formula, the filtering, the output, and the presets, ending with a practical tip about using the returned diameters. There is no redundant or filler content. The structure is logical and easy to parse for an AI agent.

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?

Given the tool's complexity (6 parameters, 3 enums) and lack of an output schema, the description is largely complete. It covers the computation method, the materials, the presets, and the output fields (velocity, Reynolds number, standard). It also connects to set_pipe_diameter. However, it does not describe the exact output format (e.g., whether it returns a list of objects) or potential error conditions, and it could mention how to handle cases where no diameter fits. These are minor gaps but enough to prevent a perfect score.

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 value beyond the schema: it explains the relationship between flow, velocity, and diameter, the material variants (HDPE, PVC, ductile iron, steel medium/Sch 40/Sch 80), and notes that for US flow units the velocity ranges are still in m/s (the tool converts internally). This clarifies how parameters like material and minVelocity/maxVelocity interact with the calculation. The added context justifies a score above the baseline.

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 the exact purpose: 'Recommend standard pipe diameters for a given flow rate and target velocity range.' It names the specific verb (recommend), resource (standard pipe diameters), and the input constraints (flow rate, velocity range). It clearly distinguishes itself from sibling tools like lookup_pipe_diameters (which lists sizes) and pipe_sizing_wizard (which likely performs a full design) by focusing on velocity-based recommendation. The description also specifies the calculation method (Q = v × πd²/4) and the output details, making its purpose 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 provides clear context for when to use the tool: 'Given a design flow... and an acceptable velocity window' and offers presets for common scenarios ('distribution, transmission, service, suction'). It also tells the user to 'specify custom min/max' for custom ranges. However, it does not explicitly mention alternatives or when not to use this tool (e.g., for full pipe sizing, use pipe_sizing_wizard). Despite this, the guidance is sufficient for an agent to select the tool correctly based on the task.

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