Skip to main content
Glama
islobodan

Crucher MCP

add

Read-onlyIdempotent

Calculates the sum of two numbers.

Instructions

Adds two numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • The handler function for the 'add' tool. It delegates to safeMath.add(a, b) to perform the addition.
    add: ({ a, b }) => safeMath.add(a, b),
  • The safeMath.add helper that performs integer-scaling arithmetic to avoid floating-point precision errors.
    add: (a, b) => {
        const d1 = countDecimals(a);
        const d2 = countDecimals(b);
        const maxDecimals = Math.max(d1, d2);
        const multiplier = Math.pow(10, maxDecimals);
        return (
            (Math.round(a * multiplier) + Math.round(b * multiplier)) /
            multiplier
        );
    },
  • The tool definition/schema for 'add', defining its inputSchema with required 'a' and 'b' numeric parameters.
    {
        name: "add",
        annotations: {
            title: "Add",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description:
            "Adds two numbers.",
        inputSchema: {
            type: "object",
            properties: { a: { type: "number" }, b: { type: "number" } },
            required: ["a", "b"],
        },
  • cruncher.js:1045-1045 (registration)
    The 'add' tool is registered by being included in the toolsAll array, then filtered by tier, and built into the TOOL_LOOKUP_MAP for O(1) lookup.
    const TOOLS = filterToolsByTier(toolsAll, TOOL_SET);
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds no additional behavioral context. For a pure function, this is adequate but does not go beyond 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?

Single sentence with no wasted words. Perfectly concise for a simple tool.

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?

Given the tool's simplicity, the description is complete. Annotations cover safety, and the return value (sum of two numbers) is obvious. No missing context.

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 has 0% description coverage, but the description 'Adds two numbers' implies that parameters a and b are the numbers to add. This adds meaning beyond the bare schema, compensating for the lack of parameter descriptions.

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?

Description 'Adds two numbers' is a specific verb+resource, clearly stating the operation. It distinguishes from sibling math tools (e.g., subtract, multiply) which perform different operations.

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?

No explicit guidance on when to use versus alternatives. While obvious for a basic addition tool, the description lacks explicit context or exclusions. Adequate but minimal.

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