Skip to main content
Glama

Penny Rounding

Which nearby list prices settle to the same cash total

price_band
Read-only

For a list price and a tax rate, find every nearby list price that settles to the SAME cash total, and the highest one.

Use this for "what price should I charge" and "can I price to gain from rounding" questions. There is exactly one free move here and it is easy to get backwards, so do not reason about it unaided:

Rounding collapses a band of five consecutive list prices onto one nickel. At 0% tax, $19.98 through $20.02 all settle to $20.00 in cash. Within that band the cash collected is IDENTICAL, so the highest price in it is strictly better — same from cash customers, up to 4 cents more from every card customer. That is genuinely free.

The move that looks clever and is not: pricing BELOW a nickel so rounding "adds" a couple of cents. You collect the same cash and less on card. The rounding delta is not revenue. Do not recommend it.

Input: listPrice as a dollar string, taxRatePercent, and optionally spreadCents (1-50, default 5) for how far either side to look.

Returns: the whole band, the highest price in it, the free gain in cents (never more than 4), and a verdict. Tell the user the size of the number. Four cents is not a pricing strategy.

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.
listPriceYesA STRING is read as dollars ("19.99"); a NUMBER is read as integer CENTS (1999). A non-integer number is refused rather than guessed at.
spreadCentsNoHow far either side to look, 1-50. Default 5, which is one whole band.
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.7/5.0
Behavior5/5

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

Annotations only provide readOnlyHint and openWorldHint, and the description adds substantial behavioral detail: the exact rounding band behavior, the 'free gain' concept, the warning that rounding delta is not revenue, and the advisory to tell users that four cents is not a pricing strategy. This goes well beyond the annotations.

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 front-loaded with the core purpose, followed by usage guidance, a key pitfall warning, input recap, and return summary. Though somewhat long, every sentence earns its place by preventing misinterpretation of a genuinely tricky pricing concept.

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 no output schema, the description explicitly lists the returns: the whole band, highest price, free gain in cents, and a verdict. It also explains the rounding mechanics, tax interaction, and the one free move, making the tool self-contained for an agent despite the domain complexity.

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 meaningful semantics: spreadCents is clarified as 'for how far either side to look' with a 1-50 range and default 5, and taxRatePercent's role is contextualized. It does omit the optional 'rule' parameter, but the schema fully documents it.

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 opens with a precise verb and resource: 'find every nearby list price that settles to the SAME cash total, and the highest one.' It clearly distinguishes this from simple rounding tools by focusing on the band of identical cash totals and the optimization opportunity.

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 tells the agent when to use the tool: for 'what price should I charge' and 'can I price to gain from rounding' questions. It also warns against a common mistaken approach, though it does not explicitly name sibling tools as alternatives.

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