Skip to main content
Glama

Discount Calculator

discount_calculator
Read-onlyIdempotent

Calculate a discounted price, ordered stacked percentage discounts, savings, effective discount and total with an entered sales tax percentage after discounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceYesOriginal price (USD; at most two decimal places)
discountsYesPercent-off values applied to the remaining price in order; final price rounds to cents
salesTaxPercentNoEntered tax percentage applied after discounts to the cent-rounded price; default 0

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description's genuinely additive detail is the computation order (discounts stacked in sequence, tax applied after discounts), but the schema's discount and tax field descriptions already state this ordering and the cent rounding, so the gain over structured fields is modest. No return format or edge-case behavior (e.g., zero price) is disclosed.

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?

A single front-loaded sentence with no filler, opening on the primary action. It is dense and slightly awkward to parse ('ordered stacked percentage discounts ... total with an entered sales tax percentage'), but nothing is wasted and no critical clause is buried.

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 full schema coverage, all annotations present, and an output schema covering the returned values, the description only needs to frame the operation and it does. A stronger version would add a one-line routing hint against the other calculator siblings, but nothing required to call it correctly is missing.

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% with numeric bounds and an example, so the schema fully documents price, discounts, and salesTaxPercent. The description merely restates them in prose ('entered sales tax percentage', 'stacked percentage discounts') without adding format or constraint information beyond the schema.

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?

States a specific verb and resource (calculate a discounted price) and enumerates the concrete outputs: stacked discounts, savings, effective discount, and tax-inclusive total. That is enough to separate it from siblings like percentage_calculator or tip_calculator, though the description never names an alternative to sharpen the distinction.

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

Usage Guidelines2/5

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

No when-to-use guidance and no exclusions. An agent facing percentage_calculator, unit_price, or margin_calculator gets no signal about which one applies to an ordered multi-discount scenario; the tool's niche is implied solely by the word 'stacked'.

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