Skip to main content
Glama

Penny Rounding

What cash rounding is actually worth across a price list

rounding_impact
Read-only

Compute what cash rounding is actually worth across a list of prices: mean delta per transaction, the up/down/unchanged split, and a per-thousand figure.

Use this whenever someone asks whether rounding costs or earns money — a very common question and one usually answered with a guess. Do not guess. Symmetric rounding nets to EXACTLY zero over evenly spread totals, because that is what it was designed to do. Real price lists all end in .99 and are not evenly spread, so the true figure is small but not always zero and it moves with the tax rate. This computes it for the actual prices given.

Input: prices is a list of dollar strings or integer cents. taxRatePercent matters, because tax decides which nickel each total lands on. rule defaults to symmetric; pass always-up to quantify what the "just round everything up" idea would be worth (about 2 cents a sale, and no jurisdiction has adopted it for retail).

Returns: mean and total delta in cents, the split, a per-thousand transaction figure, a per-price breakdown, and a plain-language verdict. Report the verdict — the size of the number is the answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNosymmetric (default) is the Common Cents Act and Canadian method. always-down is Indiana's rule for cash payments of TAX, not a retail rule. always-up is not law anywhere for retail and is here only to quantify it. none is what a card gets.
pricesYesThe prices actually charged.
taxRatePercentNoPercentage, e.g. 8.25 — not 0.0825. Supply it whenever it is known: rounding happens after tax, so the rate decides which nickel the total lands on.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavioral truths: symmetric rounding nets to exactly zero over evenly spread totals, real .99 price lists make the result small but nonzero, the tax rate changes the landed nickel, and always-up is provided only for quantification. It also explains what to report back, which is especially valuable because there is no output schema.

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 description is well-structured and front-loaded with the core computation and outputs. It is longer than strictly necessary, with some rhetorical flourishes like 'Do not guess' and 'no jurisdiction has adopted it for retail,' but most sentences carry meaningful context about behavior, inputs, or return values.

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?

For a moderately complex tool with no output schema, the description is remarkably complete: it explains when to use it, why the results behave the way they do, how each input works, what the return values are, and how to present the answer. An agent has enough context to invoke this tool correctly and interpret its result.

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 schema already thoroughly documents prices, taxRatePercent, and rule. The description adds little beyond repeating that taxRatePercent matters and rule defaults to symmetric; these facts are already present in the schema. This is the baseline 3 case where the schema carries the parameter-semantics burden.

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 uses a specific verb ('Compute') and resource ('what cash rounding is actually worth across a list of prices'), and immediately lists the concrete outputs: mean delta, up/down/unchanged split, and per-thousand figure. This clearly distinguishes it from siblings like round_cash_total, which is about rounding a single cash total, by emphasizing aggregate analysis across a price list.

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 explicitly says 'Use this whenever someone asks whether rounding costs or earns money' and warns against guessing. It provides strong contextual guidance for when the tool is appropriate, but it does not explicitly name when-not-to-use it or point to an alternative sibling such as round_cash_total for single-transaction rounding.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: price_band finds optimal list prices within a rounding band, round_cash_total computes the exact cash amount for a single transaction, and rounding_impact aggregates rounding effects across many prices. There is no meaningful overlap or ambiguity between them.

Naming Consistency3/5

All names use snake_case and are readable, but they do not follow a single grammatical pattern: price_band is a noun phrase, round_cash_total is verb-object, and rounding_impact is a gerund-noun phrase. This is a mixed convention rather than a predictable verb_noun scheme.

Tool Count5/5

Three tools is well-scoped for this narrow domain. Each tool earns its place by covering a distinct need: single-transaction rounding, pricing decisions, and aggregate impact analysis.

Completeness5/5

The set covers the full practical surface of cash rounding arithmetic: computing a rounded total, optimizing a list price within a rounding band, and measuring aggregate rounding impact over a price list. Supporting options like tender type, tax rate, and rounding rule are included where needed.

Resources