Skip to main content
Glama

Swatch Ledger

Plan fabric length to buy

plan_fabric_length
Read-onlyIdempotent

Works out how much fabric to buy before washing so that the usable length needed remains afterwards: required length = (usable length + extra) ÷ (1 − lengthwise shrinkage), then rounded up to the shop’s selling increment. Works in metres or yards (any one unit). A negative shrinkage rate means growth.

Input Schema

NameRequiredDescriptionDefault
unitNoUnit of the lengths (only used to label the answer). Default m.
extra_lengthNoOptional extra usable length after washing (default 0). Do not count an allowance the pattern already includes.
usable_lengthYesLength needed after washing (check the pattern layout), greater than 0.
shop_incrementNoThe shop’s selling increment to round up to, e.g. 0.25 for quarter metres or 0.125 for eighth yards. 0 for no rounding (default 0).
shrinkage_percentYesMeasured lengthwise shrinkage in percent, e.g. 5 for 5%. Negative means growth.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower; the description still adds real behaviour: the exact formula, round-up-to-selling-increment behaviour, unit handling, and the edge case that negative shrinkage means growth. Minor gap: it never states plainly that the returned value is the purchase length.

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?

Two sentences, front-loaded with purpose and immediately followed by the formula that determines the answer. No filler; every clause (unit flexibility, negative shrinkage) carries information the caller needs.

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?

For a pure calculation tool with no output schema and annotations covering the safety profile, the description supplies the formula, rounding rule, unit labelling, and the negative-shrinkage edge case. Only the exact shape of the result is left implicit, which is a small residual gap.

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 already 100%, and the description goes beyond it by showing how the parameters compose — usable length plus extra, divided by one minus shrinkage, then rounded to the shop increment, with the unit used only for labelling. It also flags that a negative shrinkage rate is growth, reinforcing the schema's -100..100 range.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: 'Works out how much fabric to buy before washing so that the usable length needed remains afterwards.' The boundary with the sibling measure_fabric_shrinkage is implicit in the pre-wash purchase-planning framing, but the description never names that sibling to make the split explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated — 'before washing' and 'how much fabric to buy' signal the scenario, and 'Works in metres or yards (any one unit)' constrains inputs. There is no explicit when-to-use / when-not-to-use rule and no pointer to measure_fabric_shrinkage as the alternative for the measurement step.

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