Skip to main content
Glama
islobodan

Crucher MCP

logarithm

Read-onlyIdempotent

Calculate the base-10 logarithm of a given number. Errors on non-positive input.

Instructions

Base-10 logarithm. Errors on non-positive input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes

Implementation Reference

  • Schema definition for the 'logarithm' tool. Defines name, annotations, description ('Base-10 logarithm. Errors on non-positive input.'), and inputSchema with a single required 'value' property of type number.
    // --- Logarithms ---
    {
        name: "logarithm",
        annotations: {
            title: "Logarithm",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description:
            "Base-10 logarithm. Errors on non-positive input.",
        inputSchema: {
            type: "object",
            properties: { value: { type: "number" } },
            required: ["value"],
        },
    },
  • Handler function for 'logarithm'. Validates that value > 0, throws error if non-positive, otherwise returns Math.log10(value).
    logarithm: ({ value }) => {
        if (value <= 0)
            throw new Error("Logarithm is only defined for positive numbers.");
        return Math.log10(value);
    },
  • cruncher.js:75-79 (registration)
    Tool name 'logarithm' listed in the 'standard' tool tier (line 79), which controls which tools are exposed to the LLM.
    standard: [
        "evaluate_expression",
        "add", "subtract", "multiply", "divide",
        "sqrt", "power", "absolute", "modulo", "factorial",
        "logarithm", "natural_log", "get_constant",
  • cruncher.js:136-148 (registration)
    'logarithm' is registered as a MAIN_THREAD_TOOL (line 148), meaning it runs on the main thread without worker overhead, enabling fast execution.
    const MAIN_THREAD_TOOLS = new Set([
        // Angle management
        "set_angle_mode", "get_angle_mode",
        // Trigonometry (instant Math calls)
        "sine", "cosine", "tangent", "asin", "acos", "atan",
        // Cache management
        "cache_clear", "cache_info",
        // Simple stats (zero-cost)
        "count", "min", "max", "variance", "std_dev",
        // Percentage
        "percentage_of", "percentage_change", "percentage_reverse",
        // Math one-liners
        "power", "sqrt", "logarithm", "natural_log", "absolute",
Behavior4/5

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

Beyond the annotations (readOnly, idempotent), the description adds the critical behavior that it errors on non-positive input, disclosing the input domain restriction. It also specifies base-10, which is a behavioral detail.

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 extremely concise with two sentences, front-loading the purpose in the first sentence. Every word adds value.

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?

Given the tool's simplicity (one required parameter, no output schema, no nested objects), the description covers the essential aspects: what it does and a key constraint. It could optionally state that the return value is the logarithm, but that is implied.

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?

The input schema has 0% description coverage for the single parameter 'value'. The description does not elaborate on the parameter beyond implying it's the number to compute the logarithm of, which is already clear from the tool name. No additional semantic 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 clearly states 'Base-10 logarithm', specifying the exact mathematical operation. It distinguishes from siblings like natural_log and other math functions by naming the base.

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?

The description only mentions that it errors on non-positive input, which is a constraint but does not provide guidance on when to use logarithm vs alternatives like natural_log or other arithmetic operations.

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