Skip to main content
Glama

Variación porcentual

percent-change
Read-onlyIdempotent

Calcula la variación porcentual entre un valor anterior y uno nuevo. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: calcular el p% de un valor y el valor aumentado o disminuido en p% (percent-of). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Computes the percentage change from an old value to a new value ((new − old) / |old| × 100) and the absolute difference. When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing p% of a value, and optionally the value increased or decreased by p% (percent-of). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
toYesNew value (number; required).
fromYesOld value (number; required).
decimalsNoDecimals (integer; optional; default 4; min 0; max 12).

Output Schema

NameRequiredDescriptionDefault
directionNo
differenceNo
percent_changeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / from / examples
      Added value: +[
      +  80
      +]
    • addedInput schema / properties / to / examples
      Added value: +[
      +  100
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The read-only/no-network/no-stored-state line largely restates readOnlyHint and openWorldHint, so that part earns little. The genuinely additive content is the limits block (64 KB JSON input, 1 s per call, 1 MB result) and the determinism guarantee, which no annotation conveys and which an agent needs for batching and retry decisions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Within each language the text is front-loaded with the purpose, then When / Not for / Side effects / Deterministic / Limits in a scannable order, with no filler sentences. The full Spanish and English duplication roughly doubles the length for a single-language reader, which is a real cost even if intentional.

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?

For a three-parameter pure computation with an output schema and full annotation coverage, the description covers everything an agent needs: what is computed, the exact formula, the disambiguating alternative, determinism, resource limits, and safety profile. Return values are correctly left to the output schema.

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%, so the baseline is 3. The description earns a bump because the formula fixes the semantics the schema only labels: 'from' is the denominator under an absolute value and 'to' is the numerator, which resolves the sign behaviour for negative old values. 'decimals' is not mentioned in the description, keeping it short of 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 a specific verb and resource (computes percentage change from an old value to a new value) and even gives the formula ((new − old) / |old| × 100) plus the absolute difference. It explicitly names the sibling it is not (percent-of), so the agent can separate it from the near-identical neighbour without opening either schema.

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

Usage Guidelines5/5

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

The 'When' clause gives the selecting condition (numeric result must be exact or reproducible rather than estimated), and the 'Not for' clause names the alternative tool (percent-of) with the exact scenario that routes there. Nothing about when to choose this versus percent-of or percent-ratio is left to inference.

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