Skip to main content
Glama

CodeKitHub

calculate_percentage

Read-onlyIdempotent

Percentage maths. percent_of: a% of b. what_percent: a is what % of b. percent_change: change from a to b.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
modeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description then adds the real behavioral content — what each mode actually computes — though it omits edge behavior such as division by zero and whether results are returned as fractions or percentages.

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?

One short opening sentence plus three compact mode clauses, each front-loaded with its enum value. Zero filler; every clause maps to a required input.

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 three-parameter, side-effect-free calculator with no output schema, this covers the essentials. The remaining gap is that return-value conventions and error cases (e.g. b = 0) are left for the agent to guess.

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 0%, so the description must carry parameter meaning, and it does: it defines how a and b are interpreted in each of the three modes (a% of b, a as a percentage of b, change from a to b). It leaves the numeric return convention ambiguous, which keeps it from a 5.

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?

States the resource (percentage maths) and enumerates the three exact operations it performs, each with a formulaic gloss. An agent can distinguish this from siblings like compound_interest or date_difference without opening the schema.

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 three mode names imply when each applies, but there is no explicit when-to-use guidance, no exclusions, and no mention of alternatives among the math/convert siblings. Usage is inferable rather than stated.

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