Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

friction_loss

Calculate head loss and pressure drop in water pipes using Hazen-Williams or Darcy-Weisbach methods. Use to validate pipe sizing or compare friction losses across materials and diameters.

Instructions

Calculate friction loss (head loss and pressure drop) in a full-bore water pipe. Supports two methods: Hazen-Williams (empirical, uses C-factor, water-only) and Darcy-Weisbach (physics-based, uses absolute roughness ε, universally applicable). Returns head loss per metre, total head loss over the pipe length, pressure drop, flow velocity, Reynolds number, and the Darcy friction factor. Roughness presets are available for common pipe materials (hdpe, pvc, di-cement, steel-new, steel-aged, etc.) or supply custom values. Use this to validate pipe sizing from recommend_diameter or to compare friction losses across materials/ diameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYesFriction-loss method: 'hazen-williams' (empirical, water-only, uses C-factor) or 'darcy-weisbach' (physics-based, uses pipe roughness height ε).
presetNoRoughness preset: sets roughnessC or roughnessEpsilonMm automatically. 'custom' (default) requires explicit roughness values.
lengthMYesPipe length in metres for the total head-loss calculation.
flowRateYesDesign flow rate in the given flow units.
flowUnitsYesFlow units matching EPANET's [OPTIONS] Units.
diameterMmYesPipe inner diameter in mm (the value from lookup_pipe_diameters or set_pipe_diameter).
roughnessCNoHazen-Williams C-factor (required for hazen-williams method). Typical: 150 (PVC/HDPE), 140 (new DI/steel), 100 (aged steel).
roughnessEpsilonMmNoDarcy-Weisbach absolute roughness height ε in mm (required for darcy-weisbach method). Typical: 0.007 (PVC/HDPE), 0.045 (new steel), 0.26 (new cast iron), 1.0 (concrete).
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 lists the outputs (head loss per metre, total head loss, pressure drop, flow velocity, Reynolds number, Darcy friction factor) and explains the applicability of each method (Hazen-Williams water-only, Darcy-Weisbach universal). It does not explicitly address edge cases or error handling, but for a calculation tool the behavioral traits are well covered.

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 and well-structured: it starts with the core function, then explains methods and outputs, followed by presets and usage guidance. Every sentence contributes to understanding the tool, with no redundancy or fluff. The structure appropriately front-loads the most critical information.

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 the tool's complexity (8 parameters, 5 required, two methods, presets) and the absence of an output schema, the description is remarkably complete. It covers what the tool does, the two methods and their distinctions, all return values, the availability of presets, and explicit usage context relative to siblings. An agent has all the information needed 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?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal extra meaning beyond the schema: it mentions roughness presets and custom values, but the schema already documents each preset and its effect. No additional parameter semantics are provided that would elevate the score.

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 clearly states the tool's purpose: to calculate friction loss (head loss and pressure drop) in a full-bore water pipe. It specifies two distinct calculation methods (Hazen-Williams and Darcy-Weisbach) and explicitly differentiates itself from sibling tools by mentioning validation of pipe sizing from recommend_diameter and comparison across materials/diameters.

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 provides explicit guidance on when to use the tool: 'Use this to validate pipe sizing from recommend_diameter or to compare friction losses across materials/diameters.' It names a specific sibling tool and gives clear use cases, fulfilling the 'explicit when/alternatives' criterion effectively.

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