Skip to main content
Glama

Solve a vented loudspeaker box for the length of round port to cut, with both end corrections, the smallest workable diameter and the peak port air speed.

portLength

Solve a vented loudspeaker box for the length of round port to cut, with both end corrections, the smallest workable diameter and the peak port air speed.

The identical function behind the worked examples on /lab/port-length-calculator and the calculator itself. Give the net box volume vol (litres), the port inside diameter dia (cm) and the tuning fb (Hz); temp (deg C, default 20) sets the speed of sound. Returns the length to cut (cm), the acoustic length and the end correction it contains, the port area, length/diameter, the air volume the port displaces, and the smallest diameter that can reach the tuning. When the port is too narrow, tooNarrow is true and cutLengthCm is negative: the end corrections alone already exceed the acoustic length the tuning needs. Add sd (cone area, cm^2) and xmax (peak excursion, mm) together for the peak port air speed.

Every result carries provenance.canonicalUrl — the published page for these exact inputs, or the lane hub when they are off the published grid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fbYesBox tuning frequency, hertz.
sdNoDriver effective cone area Sd, cm^2. Give with `xmax` for the peak port air speed.
diaYesInside diameter of a round port, centimetres. For a slot, the diameter of the round port of equal area, 2*sqrt(w*h/pi).
volYesNet internal box volume, litres (after the driver, bracing and port are subtracted).
tempNoAir temperature, deg C. Default 20.
xmaxNoDriver peak one-way excursion, mm. Give with `sd`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYesThe parsed inputs, echoed back with defaults filled in.
resultYesThe solved analysis. Shape is per-tool.
licenseYes
provenanceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
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, and it does substantial work: it lists the returned quantities and, critically, discloses the edge case that 'When the port is too narrow, tooNarrow is true and cutLengthCm is negative'. It also discloses that every result carries provenance.canonicalUrl. It does not explicitly state the tool is a side-effect-free calculation, which keeps it short of a 5.

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 purpose is front-loaded and the body is dense with useful detail. The opening sentence duplicates the title verbatim, which is mild waste, but the remaining sentences each add output, edge-case, or provenance information rather than padding.

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?

Although an output schema exists (so return values need not be explained), the description still documents the notable outputs and the counter-intuitive tooNarrow/negative-length condition plus provenance, which an agent benefits from before calling. With 6 parameters and no annotations, this is close to complete; only an explicit statement that the tool is a pure computation 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 100%, so the baseline is 3, but the description adds meaning the schema lacks — most notably that 'temp (deg C, default 20) sets the speed of sound', i.e. why the parameter matters, rather than just restating its units. It also frames sd/xmax as a required pair for air speed, complementing the schema's individual notes.

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 a specific verb and resource — 'Solve a vented loudspeaker box for the length of round port to cut' — and enumerates the outputs (end corrections, smallest workable diameter, peak port air speed). Against siblings like biquadDesign, opticsResonator, and solenoidField, it is unmistakably the acoustic-port calculator, so an agent can discriminate without opening a schema.

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?

It names the three required inputs and gives explicit conditional guidance: 'Add sd (cone area, cm^2) and xmax (peak excursion, mm) together for the peak port air speed', clarifying that the optional pair is jointly needed. There is no when-not guidance or alternative tool named, but the siblings occupy unrelated domains so no exclusions are warranted.

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.

Resources