Skip to main content
Glama

UK Data: Finance formulas

calculate_discount

Read-onlyIdempotent

Calculates the discounted price after applying a percentage discount to the original price. Returns both discount amount and final price. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
original_priceNonumber, required, original price before discount, currency units, no default
discount_percentageNonumber, required, discount percentage, plain number (20 = 20%), no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, non-destructive, and open-world, so the description need not repeat safety traits. It usefully adds that the result contains both discount amount and final price and discloses a 1-credit cost, though it does not mention rounding or invalid-input behavior.

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 front-load the operation and output, and the cost note is compact. There is no redundant or buried information.

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 two-parameter calculation with complete schema descriptions and annotations, the definition gives enough to call and interpret the tool. The absence of an output schema is offset by the statement that it returns discount amount and final price.

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%, and the schema already defines original_price and discount_percentage with units and percentage conventions. The description adds no parameter-level detail beyond restating that a percentage discount is applied.

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?

The description states a specific verb and resource and explains the output: discounted price, discount amount, and final price. It does not distinguish this tool from the near-identical sibling calculate_discounted_price, so sibling differentiation is missing.

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?

Usage is implied by the calculation context, but the description gives no explicit when-to-use guidance, prerequisites, or comparison with alternatives such as calculate_discounted_price. An agent must infer selection from the name and purpose alone.

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