Skip to main content
Glama

Calculate buy X pay Y promotion

calculate_buy_x_pay_y

Calculate total paid, effective unit price and discount for buy-X-pay-Y or take-X-pay-Y promotions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currencyNoUSD
pay_unitsYes
take_unitsYes
regular_unit_priceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are present, so the description is the only behavioral signal. 'Calculate' implies a pure read-only computation and names the output values, but does not mention edge cases (e.g., pay_units=0), rounding, or return format. This is acceptable for a simple calculator but not fully transparent.

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?

A single sentence that front-loads the computation and the domain, with no filler or repeated title content.

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 simple 4-parameter calculator with no output schema, the description names all returned quantities and the applicable promo types, which is enough for an agent to call it. It lacks output formatting and edge-case guidance, but these are minor for this tool.

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 descriptions are absent (0% coverage), leaving parameter semantics to names and the description. Names like take_units, pay_units, regular_unit_price and currency are self-explanatory, and the promo wording maps X/Y to the unit parameters. However, no description clarifies relationships (e.g., whether take_units must exceed pay_units) or the currency default, so the description only partially compensates.

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 clear verb ('Calculate'), explicit output set (total paid, effective unit price, discount), and bounds the domain to buy-X-pay-Y/take-X-pay-Y promotions. It distinguishes itself from sibling normalization/comparison tools by naming the promotion type, though it leaves overlap with calculate_real_discount implicit.

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 'for buy-X-pay-Y or take-X-pay-Y promotions' clause gives a clear applicability condition. It does not name sibling alternatives or state exclusions, so an agent must infer when not to use it, but the target scenario is explicit.

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