Skip to main content
Glama
tech-sushant

Calculator MCP Server

by tech-sushant

multiply

Calculate the product of two numbers by multiplying them together using this arithmetic tool.

Instructions

Multiply two numbers together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst number to multiply
bYesSecond number to multiply

Implementation Reference

  • Handler for the 'multiply' tool: destructures arguments 'a' and 'b', computes their product, and returns a formatted text response.
    case "multiply": {
      const { a, b } = args as { a: number; b: number };
      const result = a * b;
      return {
        content: [
          {
            type: "text",
            text: `${a} × ${b} = ${result}`,
          },
        ],
      };
    }
  • src/index.ts:56-73 (registration)
    Registration of the 'multiply' tool in the ListTools response, including name, description, and input schema defining parameters 'a' and 'b' as required numbers.
    {
      name: "multiply",
      description: "Multiply two numbers together",
      inputSchema: {
        type: "object",
        properties: {
          a: {
            type: "number",
            description: "First number to multiply",
          },
          b: {
            type: "number",
            description: "Second number to multiply",
          },
        },
        required: ["a", "b"],
      },
    },
  • Input schema for the 'multiply' tool, specifying an object with required number properties 'a' and 'b'.
    inputSchema: {
      type: "object",
      properties: {
        a: {
          type: "number",
          description: "First number to multiply",
        },
        b: {
          type: "number",
          description: "Second number to multiply",
        },
      },
      required: ["a", "b"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('multiply') but doesn't describe any behavioral traits such as error handling (e.g., for non-numeric inputs), performance characteristics, or side effects. For a mathematical operation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond the basic function.

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 a single, efficient sentence ('Multiply two numbers together') that directly states the tool's purpose with zero waste. It is appropriately sized for a simple tool and front-loaded, making it easy for an agent to parse quickly.

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 tool's low complexity (a basic arithmetic operation), 100% schema coverage, and no output schema, the description is minimally adequate. It states what the tool does but lacks details on usage guidelines, behavioral transparency, or output expectations. For such a simple tool, this might be sufficient, but it doesn't provide complete context for optimal agent invocation.

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

Parameters3/5

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

The input schema has 100% description coverage, with clear documentation for both parameters ('a' and 'b'). The description adds no additional meaning beyond what the schema provides—it merely restates that two numbers are multiplied. According to the rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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?

The description clearly states the tool's purpose as 'Multiply two numbers together', which is a specific verb (multiply) applied to resources (two numbers). It distinguishes from siblings like 'add' or 'divide' by specifying the multiplication operation. However, it doesn't explicitly differentiate from all siblings (e.g., 'power' could also involve multiplication), so it doesn't reach the highest score.

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 provides no guidance on when to use this tool versus alternatives like 'add', 'divide', 'power', 'sqrt', or 'subtract'. It doesn't mention any context, prerequisites, or exclusions for usage. The agent must infer usage based on the tool name alone, which is insufficient for optimal selection.

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/tech-sushant/calculator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server