Skip to main content
Glama

Razi Dev Utilities

calculate_percentage

Run one of four percentage calculations on two numbers. Returns JSON { operation, result } (plus unit: 'percent' for the 'change' operation). The meaning of value1 and value2 depends on the operation, so read their descriptions before calling. Exact arithmetic, no model involved, no rounding applied. Ratios and general expressions are not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
value1YesFor 'of', the percentage itself (25 means 25%). For 'increase' and 'decrease', the base amount being adjusted. For 'change', the original value. Must be a finite number.
value2YesFor 'of', the amount the percentage is taken from. For 'increase' and 'decrease', the percentage to apply (10 means 10%). For 'change', the new value. Must be a finite number.
operationYesWhich calculation to run. 'of' = value1 percent OF value2. 'increase' = value1 raised BY value2 percent. 'decrease' = value1 reduced BY value2 percent. 'change' = the percentage change going FROM value1 TO value2, which errors when value1 is 0. Required; any other value is rejected.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the return format (JSON { operation, result }), the extra 'unit' field for 'change', that arithmetic is exact with no rounding, and that it involves no model. It also mentions the limitation on ratios. While it does not discuss error handling beyond the schema's note on 'change' when value1=0, the key behavioral traits are transparently disclosed.

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 three sentences with zero fluff. The primary purpose is front-loaded, the return format is given immediately, and the operational nuances are compressed into two final sentences. Every sentence earns its place, making it highly efficient for an agent to parse.

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 tool with four operations and no output schema, the description covers the essential context: it states the return structure, the special 'unit' for 'change', the exactness of arithmetic, and the limitation on ratios. It also points to the schema for parameter semantics. The only minor gap is that it doesn't mention potential edge cases (e.g., division by zero in 'of' when value2=0), but the schema covers the 'change' error case, so overall it is reasonably complete.

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 description coverage is 100%, so the baseline is 3. The description adds a valuable hint that value1/value2 semantics depend on the operation and advises reading their descriptions, but it does not add substantive meaning beyond the schema. The schema already provides per-operation explanations for each parameter, so the description's contribution is minimal but helpful.

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 states exactly what the tool does: 'Run one of four percentage calculations on two numbers.' It names the resource (percentage calculations), the verb (run), and the scope (four operations). It also distinguishes from siblings, which are all encoding/decoding/formatting tools, so there is no ambiguity. The return format is mentioned upfront, making the purpose even clearer.

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 gives practical usage guidance: it notes that value1/value2 meanings depend on the operation and instructs the agent to read their descriptions before calling. It also explicitly states what is NOT supported ('Ratios and general expressions are not supported'), which helps avoid misuse. Since no sibling tool does similar work, explicit alternatives are not needed, but a more direct 'use this when you need percentage calculations' would strengthen the guidance.

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