Skip to main content
Glama

Water or gas pipe size, velocity and pressure loss

size_pipe
Read-onlyIdempotent

Sizes a hot or cold water pipe, or a low-pressure gas pipe, and shows the working. Water: design flow (from outlets, with a simple in-use-at-once rule, or a flow you give), velocity against a limit (1.5 m/s default), pressure loss per metre and in total, and the pressure left at the outlet if you give the supply pressure. Gas: flow from the gross heat input of the appliances fed, pressure drop against the 1 mbar natural gas (2.5 mbar LPG) allowance, with a meter capacity warning. Returns recommended (smallest size that passes), sizes_considered, must_check (points the engineer confirms) and sources. Calculated from fluid physics (Darcy-Weisbach); no BS EN 806 or BS 6891 tables are reproduced. Typical calls: {"medium":"gas","heat_input_kw_gross":30,"run_length_m":12,"fittings":{"elbows":5}} or {"medium":"water","service":"cold","outlets":[{"type":"bath"},{"type":"kitchen_sink"},{"type":"basin"},{"type":"wc"},{"type":"shower_mixer"}],"run_length_m":15,"supply_pressure_bar":2.5,"height_rise_m":3}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "medium": "<medium>",
      "run_length_m": "<run_length_m>"
    },
    "name": "size_pipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
gasNoGas only. Default natural_gas.
tradeNoOptional. The plumber or heating engineer's own business details (Nero Trade Profile v1, the same shape as Spark Pack and Nero Work). Used to prefill records and to give a stable nero_trade_ref. Not stored by Flow Pack.
mediumYes
outletsNoWater only: outlets this pipe feeds.
serviceNoWater only. Default cold.
fittingsNoCount of fittings on the run. If left out, 30% is added to the length instead (or fittings_allowance_percent).
materialNoWater: copper (default), plastic, mdpe. Gas: copper (default), steel, csst.
pipe_size_mmNoCheck only this nominal size.
run_length_mYesMeasured pipe length, metres (from the meter for gas, from the stop tap or cylinder for water).
water_temp_cNoWater only. Default 10 cold, 60 hot.
gas_flow_m3_hNoGas only: gas flow, if already known.
height_rise_mNoWater only: height gained from start to outlet (negative if it falls).
design_flow_l_sNoWater only: design flow in litres a second, if known (overrides outlets).
max_velocity_m_sNoWater only. Default 1.5.
allowed_drop_mbarNoGas only. Default 1 natural gas, 2.5 LPG.
heat_input_kw_netNoGas only: if only the net figure is known.
heat_input_kw_grossNoGas only: total gross heat input of every appliance this pipe feeds (data plate).
supply_pressure_barNoWater only: working pressure at the start of the run (measured with water flowing).
simultaneous_outletsNoWater only: how many outlets run at once. Default: square root of the number of outlets, rounded.
fittings_allowance_percentNoLength added for fittings when they are not counted. Default 30.
min_pressure_at_outlet_barNoWater only: pressure needed at the end. Default 1.0 bar.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses the response keys (recommended, sizes_considered, must_check, sources), the pass/fail criteria applied (velocity against a limit, pressure drop against the 1 mbar natural gas / 2.5 mbar LPG allowance), the gas meter capacity warning, and explicitly bounds its authority ("no BS EN 806 or BS 6891 tables are reproduced"). That last point is genuinely important behavioural context for an engineering tool.

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?

Content is front-loaded as purpose, then water branch, then gas branch, then outputs, then examples — a logical order for a 21-parameter tool. The sentences are long and clause-heavy, particularly the water sentence, which slightly hurts scannability, but no sentence is filler.

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?

With 21 parameters, nested objects, four enums and no output schema, this tool needs a rich description, and the definition supplies it: both calculation branches, the default assumptions, the returned keys, and the scope limitation. Nothing an agent needs to select or invoke it correctly is missing.

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 95%, so the baseline is 3, but the prose adds real meaning the schema does not: the "simple in-use-at-once rule" behind simultaneous_outlets, that outlets drive design flow unless design_flow_l_s overrides, and that the default velocity limit is 1.5 m/s. It does not explain the trade object, but the schema already documents that thoroughly.

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 leads with a specific verb and resource ("Sizes a hot or cold water pipe, or a low-pressure gas pipe") and immediately splits the behaviour into two named branches. It states the physical methodology (Darcy-Walsh) and the outputs, so an agent knows exactly what class of calculation this performs versus sizing tools for heat sources or radiators.

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?

Usage conditions are implied well: "Water: design flow (from outlets... or a flow you give)" and "Gas: flow from the gross heat input" tell the agent which parameter branch to supply, and two concrete example calls disambiguate the two modes. It stops short of naming sibling tools or stating when not to use this (e.g. when only a check of an existing size is wanted, which is actually covered by pipe_size_mm but not called out as an alternative mode).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.