Skip to main content
Glama

Estimate cashback for a purchase

calculate_cashback
Read-onlyIdempotent

Work out the cashback on a purchase: commission = price × commission rate, of which the buyer receives a share set by their CashbackPro level (Bronze 30%, Silver 45%, Gold 60%, Platinum 80%). Returns the figure for every level. Pure calculation — nothing is looked up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
price_usdYesProduct price in USD
commission_rate_percentYesAliExpress commission rate, percent (e.g. 7 for 7%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent), the description reveals the exact calculation logic, the tier percentages, and that it returns a result for every level. This adds meaningful behavioral context about what the tool does and doesn't do, including no external lookups.

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 two sentences, tightly packed with necessary information: the formula, the level shares, and the pure-calculation nature. No fluff or redundancy.

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 calculation tool with no output schema, the description is sufficient. It fully explains the inputs, the calculation, and the output behavior (per level). It doesn't describe the exact return format, but that's not essential for a pure math tool with clear annotations.

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 baseline is 3. The description adds value by explaining how the parameters relate (price × commission rate) and how the result varies by CashbackPro level, which goes beyond the simple field descriptions in the schema.

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 clearly states the tool calculates cashback on a purchase, using a specific formula and level-based shares. It distinguishes itself from sibling tools like get_cashback_link or get_product_details by emphasizing it's a pure calculation, not a lookup.

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 'Pure calculation — nothing is looked up,' which implies when to use it (for estimation without needing live data) and when not to use it (when live product/link data is needed). It doesn't name sibling alternatives explicitly but provides enough context to differentiate.

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