Skip to main content
Glama

percentage-calculator

Read-onlyIdempotent

Calculate percentages three ways: what's X% of Y, what % is X of Y, and what's the % change from X to Y. Use mode='of' for the first form, mode='ratio' for the second, mode='change' for the third.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst number. Meaning depends on mode (see description).
bYesSecond number. Meaning depends on mode.
modeYesWhich percentage operation. 'of' = X% of Y, 'ratio' = X is what % of Y, 'change' = % change from X to Y.
precisionNoDecimal places in the result. Defaults to 2.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesCalculated result.
formulaYesFormula used to compute the result.
explanationYesHuman-readable description of what was computed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds the three-mode breakdown but repeats information already present in the schema's mode description, offering minimal additional behavioral context.

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 compact sentences: the first states the overall purpose, the second gives explicit mode mappings. No filler or redundant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, all parameters are documented in schema (including precision), output schema exists, and the description explains all three modes. Nothing critical is missing for an agent to select and invoke the tool correctly.

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 description coverage is 100%, providing baseline 3. The description goes further by giving concrete examples of what X and Y mean in each mode ('what's X% of Y', 'what % is X of Y'), making parameter semantics more intuitive than the schema alone.

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 percentages in three distinct ways, specifying the exact forms (X% of Y, X as % of Y, % change). This distinguishes it from sibling calculator tools and immediately conveys its scope.

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?

It provides clear context by explaining the three operation modes and explicitly maps each mode to a use case. It does not mention alternatives or when not to use this tool, but for a percentage calculator the covered forms are comprehensive enough.

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