Skip to main content
Glama
islobodan

Crucher MCP

natural_log

Read-onlyIdempotent

Calculate the natural logarithm of a positive number. Returns an error for zero or negative input.

Instructions

Natural logarithm (ln). Errors on non-positive input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes

Implementation Reference

  • The handler function for the natural_log tool. It takes a 'value' argument, throws an error if value <= 0, and returns Math.log(value) (the natural logarithm).
    natural_log: ({ value }) => {
        if (value <= 0)
            throw new Error(
                "Natural log is only defined for positive numbers.",
            );
        return Math.log(value);
    },
  • Input schema for the natural_log tool. Defines the tool name, title, description ('Natural logarithm (ln). Errors on non-positive input.'), and inputSchema expecting a single 'value' of type number (required).
    {
        name: "natural_log",
        annotations: {
            title: "Natural Logarithm",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description:
            "Natural logarithm (ln). Errors on non-positive input.",
        inputSchema: {
            type: "object",
            properties: { value: { type: "number" } },
            required: ["value"],
        },
    },
  • cruncher.js:76-79 (registration)
    Registration of natural_log in the 'standard' tool tier list, ensuring the tool is included by default in the standard tool set.
    "evaluate_expression",
    "add", "subtract", "multiply", "divide",
    "sqrt", "power", "absolute", "modulo", "factorial",
    "logarithm", "natural_log", "get_constant",
  • cruncher.js:148-149 (registration)
    Registration of natural_log as a MAIN_THREAD_TOOLS entry, meaning it runs in the main thread (no worker overhead) for fast execution.
    "power", "sqrt", "logarithm", "natural_log", "absolute",
    // Constant lookup
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds the critical behavior that errors occur on non-positive input, which is 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?

Two short sentences, perfectly front-loaded with the tool's core purpose. No extraneous information.

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 function with no output schema, the description covers the essential: what it computes and a critical error condition. Adequate for the complexity.

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

Parameters1/5

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

Schema description coverage is 0% and the description does not elaborate on the 'value' parameter beyond its existence. No additional meaning is provided.

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 explicitly states 'Natural logarithm (ln)' and distinguishes from sibling 'logarithm' by specifying the base. The error condition on non-positive input adds clarity.

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?

The description implies use for natural log but does not explicitly compare with 'logarithm' or other similar tools. No guidance on when to use this vs alternatives.

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