Skip to main content
Glama
hjlrosales

EPANET MCP Server

by hjlrosales

calculate_minor_loss

Calculate minor head loss through pipe fittings using K-factor method, taking diameter, flow, and fitting list to return velocity, total loss, and pressure drop for system sizing.

Instructions

Calculate total minor (dynamic) head loss through a set of pipe fittings using the K-factor method: h = K × v² / (2g). Provide a pipe diameter, flow rate, and a list of fitting types with quantities. Each fitting's K-factor is looked up from the built-in database (use list_fitting_kfactors to see available types), or supply a customK for non-standard fittings. Returns: flow velocity, individual fitting losses, total minor loss, total equivalent length of pipe, and pressure drop. Use this to account for valves, elbows, tees, and other fittings when sizing pipes or pumps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fittingsYesList of fittings. Each entry has a type (key from list_fitting_kfactors), optional quantity, and optional customK override.
flowRateYesFlow rate in the given units.
flowUnitsYesFlow units matching EPANET's [OPTIONS] Units.
diameterMmYesPipe inner diameter in mm (at the fitting location).
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It transparently explains the calculation method (K-factor formula), how K-factors are obtained (database lookup or customK), and what outputs to expect. It does not explicitly state that the operation is read-only, but 'Calculate' implies no side effects. It also lacks caveats about invalid fitting types, but this is a minor gap for a pure calculation tool.

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 three sentences, each earning its place: the first gives the purpose and formula, the second details inputs and the K-factor lookup mechanism, and the third lists return values and the primary use case. No fluff, perfectly front-loaded with the core purpose.

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 absence of an output schema, the description appropriately enumerates all return values (flow velocity, individual fitting losses, total minor loss, equivalent length, pressure drop). It also explains how to discover available fitting types via `list_fitting_kfactors` and covers the key parameters. The description leaves nothing essential for an agent to safely call the tool.

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 coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining the K-factor formula, the relationship between flow rate and diameter, and the purpose of `customK` (to override or supply a K-factor for non-standard fittings). It also clarifies that `type` must be a key from `list_fitting_kfactors`, which is not fully apparent from the schema alone.

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 a specific verb ('Calculate') and resource ('minor (dynamic) head loss through a set of pipe fittings') with a precise formula. It distinguishes itself from the sibling `friction_loss` by focusing on fittings and the K-factor method, while naming the exact return values. The tool's scope is unambiguous and well-delimited.

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 says 'Use this to account for valves, elbows, tees, and other fittings when sizing pipes or pumps,' giving a clear intended use case. It also points to `list_fitting_kfactors` for available types, which is a cooperative sibling. However, it does not explicitly contrasts with `friction_loss` for straight-pipe scenarios, though the phrasing 'minor head loss' makes the distinction implicit.

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