Skip to main content
Glama
islobodan

Crucher MCP

sum

Read-onlyIdempotent

Compute the total of a list of numbers. Provide an array of numeric values to get their sum.

Instructions

Sum of numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numbersYes

Implementation Reference

  • The handler function for the 'sum' tool. It takes an array of numbers and reduces them using safeMath.add to avoid floating-point errors, starting from 0.
    sum: ({ numbers }) =>
        numbers.reduce((acc, val) => safeMath.add(acc, val), 0),
  • The schema/definition for the 'sum' tool, specifying the name, annotations, description, and inputSchema (an object with a required 'numbers' array of numbers).
        name: "sum",
        annotations: {
            title: "Sum",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description: "Sum of numbers.",
        inputSchema: {
            type: "object",
            properties: {
                numbers: { type: "array", items: { type: "number" } },
            },
            required: ["numbers"],
        },
    },
  • cruncher.js:75-86 (registration)
    The 'sum' tool is registered in the 'standard' tool tier list, which controls which tools are exposed via the CRUNCHER_TOOL_SET environment variable.
    standard: [
        "evaluate_expression",
        "add", "subtract", "multiply", "divide",
        "sqrt", "power", "absolute", "modulo", "factorial",
        "logarithm", "natural_log", "get_constant",
        "sine", "cosine", "tangent", "asin", "acos", "atan",
        "set_angle_mode", "get_angle_mode",
        "sum", "avg", "min", "max", "count", "variance", "std_dev",
        "percentage_of", "percentage_change", "percentage_reverse",
        "median", "range",
        "convert_unit",
    ],
Behavior3/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. Description adds no further behavioral context beyond the basic operation.

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?

Very concise (3 words), front-loaded. While brief, it is appropriate for a simple operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one parameter, no output schema), the description is minimally adequate but does not explain return value or potential edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage; description only says 'Sum of numbers', which minimally clarifies the parameter purpose but lacks detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it calculates the sum of numbers, distinguishing it from sibling operations like multiply or subtract.

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 vs alternatives like 'add' or 'avg'. Context is implied but not explicit.

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