Skip to main content
Glama

discount

Apply a percentage discount to a price and return the sale price, amount saved and effective rate. Pure CPU, instant.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "price": "<price>"
    },
    "name": "discount"
  }
}

Input Schema

NameRequiredDescriptionDefault
priceYesOriginal price
percentNoDiscount percent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / percent
      Added value: +{
      +  "description": "Discount percent",
      +  "type": "number"
      +}
    • addedInput schema / properties / price
      Added value: +{
      +  "description": "Original price",
      +  "type": "number"
      +}
    • addedInput schema / required
      Added value: +[
      +  "price"
      +]
  4. Added

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden; "Pure CPU, instant" usefully discloses that this is a cheap, side-effect-free, non-networked computation. However, it is silent on what happens when the optional percent parameter is omitted, and does not state whether results are rounded or how precision is handled — meaningful gaps for a numeric tool.

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?

Two short sentences, zero filler, and the capability with its return values is front-loaded before the performance note. Every clause earns its place.

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 trivial two-parameter pure function with no output schema, the description is nearly sufficient — it names the operation and enumerates the three return values, which substitutes for the missing output schema. The only real omission is the behavior of the non-required percent parameter.

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 coverage is 100% with both parameters documented ("Original price", "Discount percent"), so the schema already does the heavy lifting and the baseline applies. The description adds no interpretation of units (is percent 0-100 or 0-1?) or the optional-parameter default, which is exactly the kind of meaning the schema leaves out.

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?

"Apply a percentage discount to a price and return the sale price, amount saved and effective rate" gives a specific verb (apply), resource (percentage discount on a price), and even the return fields. It does not name a distinguishing boundary against nearby siblings like percentage_calculator or tip_calculator, so it stops short of a 5.

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

Usage Guidelines3/5

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

The phrase "apply a percentage discount to a price" implies the usage context (markdown/sale-price math), but there is no explicit when-to-use guidance and no routing to alternatives such as percentage_calculator or tip_calculator, which occupy adjacent territory in the sibling list.

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