Skip to main content
Glama
islobodan

Crucher MCP

sine

Read-onlyIdempotent

Calculate the sine of an angle in degrees or radians.

Instructions

Sine. Angle in degrees by default, or radians with unit: "radians".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
angleYes
unitNo

Implementation Reference

  • Input schema definition for the 'sine' tool, defining its name, description, and required parameters (angle with optional unit).
    {
        name: "sine",
        annotations: {
            title: "Sine",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
        },
        description:
            'Sine. Angle in degrees by default, or radians with unit: "radians".',
        inputSchema: {
            type: "object",
            properties: {
                angle: { type: "number" },
                unit: { type: "string", enum: ["degrees", "radians"] },
            },
            required: ["angle"],
        },
    },
  • The actual handler function for 'sine': computes Math.sin(toRadians(angle, unit)), converting degrees to radians via the toRadians helper.
    /**
     * Calculates the sine of an angle.
     * @param {Object} args - The arguments object.
     * @param {number} args.angle - The angle value.
     * @param {string} [args.unit] - The unit ("degrees" or "radians").
     * @returns {number} The sine of the angle.
     */
    sine: ({ angle, unit }) => Math.sin(toRadians(angle, unit)),
  • The toRadians helper function used by the sine handler to convert angle from degrees to radians based on the unit parameter or global angleMode.
    // --- Trigonometry Helpers ---
    
    /**
     * Converts an angle to radians if it's in degrees.
     * @param {number} angle - The angle value.
     * @param {string} [unit] - The unit ("degrees" or "radians").
     * @returns {number} The angle in radians.
     */
    const toRadians = (angle, unit) => {
        const resolved = unit || angleMode;
        return resolved === "degrees" ? angle * (Math.PI / 180) : angle;
    };
  • cruncher.js:80-80 (registration)
    Registration of 'sine' in the standard tool set tier (line 80 of toolsAll definition, also listed in TRIG_TOOLS and MAIN_THREAD_TOOLS sets).
    "sine", "cosine", "tangent", "asin", "acos", "atan",
  • cruncher.js:127-127 (registration)
    TRIG_TOOLS set includes 'sine' so results are cached after execution.
    const TRIG_TOOLS = ["sine", "cosine", "tangent", "asin", "acos", "atan"];
Behavior4/5

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

Annotations already indicate readOnly, destructive, and idempotent hints. The description adds specific behavioral detail about unit handling, which is useful 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?

One sentence, front-loaded with purpose, no wasted words. Every part earns its place.

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?

For a simple sine function with only two parameters, the description fully covers behavior. No output schema is needed since sine returns a number.

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 coverage is 0%, so description must compensate. It explains the 'angle' parameter's default unit and how to use the 'unit' parameter, adding meaning beyond the schema.

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 starts with 'Sine.', explicitly naming the operation, and clarifies the unit behavior (default degrees, option for radians). This distinguishes it from sibling trigonometric functions like cosine, tangent, etc.

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

Usage Guidelines4/5

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

It clearly states the default unit and how to switch to radians. While it doesn't explicitly list when-not-to-use or alternatives, the context is straightforward for a basic math function.

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