Skip to main content
Glama

calculate_sales_tax

Read-onlyIdempotent

Work out sales tax exactly, in whole minor units. mode "add": amount is the price before tax. mode "extract": amount already includes the tax, and the net price and the tax inside it are returned. rate is a percentage like "8.25". Money is a decimal string. Returns net, tax and gross as decimal strings rounded to the currency's decimals (default 2). Free. Make receipts only for lawful purposes, such as replacing a lost receipt, bookkeeping, testing or design mockups. Using a receipt to deceive anyone, including for refunds, expense claims or proof of purchase, is prohibited.

Input Schema

NameRequiredDescriptionDefault
modeYesadd: amount is before tax. extract: amount includes tax
rateYesTax rate in percent, like "8.25"
amountYesThe price, as a decimal string like 100.00
currencyNoOnly decimals matters here (0, 2 or 3); default 2 decimals

Output Schema

NameRequiredDescriptionDefault
netYes
taxYes
grossYes

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/no-destruction, and the description usefully adds that it is free, that rounding follows the currency's decimals (default 2), and that results are exact in minor units. The receipt-prohibition boilerplate is irrelevant to a pure calculation tool and could mislead an agent into treating this as a receipt-generating tool, which costs it a point.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first half is dense and front-loaded, covering mode, rate, and return shape efficiently. The final two sentences about lawful receipt uses are ~45 words of policy boilerplate unrelated to calculating tax, diluting the signal.

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?

With an output schema present and full annotation coverage, the description only needs to convey mode semantics and rounding, which it does. The nested currency object is only partially addressed ("Only decimals matters"), but that caveat is carried in the schema itself.

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?

Description reinforces the mode semantics beyond the enum, gives a concrete rate example ("8.25"), and notes the decimal-string money format plus the default of 2 currency decimals. Schema coverage is already 100%, so most of this is reinforcement rather than new information, but it is accurate and helpful.

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?

"Work out sales tax exactly" is a specific verb+resource that is unambiguous against siblings like calculate_tip or make_receipt. It doesn't explicitly name a sibling to route away from, but the resource is distinct enough that no further differentiation is needed.

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 add/extract distinction is spelled out with concrete conditions ("amount is the price before tax" vs "amount already includes the tax"), which tells an agent exactly which mode to pick. There is no exclusion guidance (e.g., when to prefer calculate_tip or make_receipt), and the trailing receipt-policy sentences imply usage contexts the tool does not support.

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