Skip to main content
Glama
islobodan

Crucher MCP

percentage_change

Read-onlyIdempotent

Calculate the percentage change between two numeric values to determine increase or decrease.

Instructions

Percentage change from A to B. e.g., 50→80 = +60%

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYes
toYes

Implementation Reference

  • Input schema definition for the percentage_change tool, defining two required params: 'from' (number) and 'to' (number), with a description 'Percentage change from A to B. e.g., 50→80 = +60%'.
    {
        name: "percentage_change",
        annotations: {
            title: "Percentage Change",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description:
            "Percentage change from A to B. e.g., 50→80 = +60%",
        inputSchema: {
            type: "object",
            properties: {
                from: { type: "number" },
                to: { type: "number" },
            },
            required: ["from", "to"],
        },
    },
  • The actual handler function for percentage_change. Calculates percentage change from 'from' to 'to' using the formula ((to - from) / from) * 100. Throws an error if 'from' is zero.
    percentage_change: ({ from, to }) => {
        // % change from A to B: ((to - from) / from) * 100
        if (from === 0)
            throw new Error("Cannot calculate percentage change from zero.");
        return ((to - from) / from) * 100;
    },
  • cruncher.js:82-83 (registration)
    Registration of percentage_change in the 'standard' tool tier set, which determines which tools are exposed to the LLM.
    "sum", "avg", "min", "max", "count", "variance", "std_dev",
    "percentage_of", "percentage_change", "percentage_reverse",
  • cruncher.js:144-146 (registration)
    Registration of percentage_change in MAIN_THREAD_TOOLS set, marking it as an instant tool that runs in the main thread without worker overhead.
    "count", "min", "max", "variance", "std_dev",
    // Percentage
    "percentage_of", "percentage_change", "percentage_reverse",
Behavior4/5

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

Annotations already indicate read-only and idempotent behavior. The description adds the formula and sign convention (positive for increase) via example, providing useful behavioral context beyond the annotations.

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 minimal and efficient: one sentence with an example. No superfluous text; every part is necessary for understanding.

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 math tool with no output schema, the description covers the operation and gives an example. It lacks detail on output format, but the example implies a percentage string. Adequate for the complexity.

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 0%, so the description should compensate. It implicitly maps 'A' to 'from' and 'B' to 'to' through the example, but does not explicitly define each parameter. The example helps clarify usage.

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 computes percentage change from A to B with a concrete example. It distinguishes from sibling math tools like percentage_of and percentage_reverse by specifying the exact operation.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like percentage_of or percentage_reverse. The description only states what it does, not the context or conditions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/islobodan/cruncher-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server