Skip to main content
Glama
wrtnlabs

Calculator MCP

by wrtnlabs

mul

Multiply two numbers quickly and accurately using the 'mul' tool. Input numerical values into the Calculator MCP server to obtain instant results for any multiplication task.

Instructions

Multiply two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • The asynchronous handler function for the 'mul' tool that multiplies the input numbers 'a' and 'b' and returns a textual response with the product.
    handle: async (params) => {
      const a = params.a as number;
      const b = params.b as number;
      const result = a * b;
      return { content: [{ type: "text", text: `The product of ${a} and ${b} is ${result}` }] };
    },
  • The schema definition for the 'mul' tool, specifying the name, description, and input schema (two numbers 'a' and 'b') converted to JSON schema via Zod.
    schema: {
      name: "mul",
      description: "Multiply two numbers",
      inputSchema: zodToJsonSchema(z.object({ a: z.number(), b: z.number() })),
    },
  • src/server.ts:9-9 (registration)
    The 'mul' tool is registered by including it in the 'tools' array used by the MCP server for tool listing and calling.
    const tools = [add, div, mod, mul, sqrt, sub];
  • src/server.ts:7-7 (registration)
    Import of the 'mul' tool from the tools module in the server setup.
    import { add, div, mod, mul, sqrt, sub } from "./tools";
  • src/tools/index.ts:4-4 (registration)
    Re-export of the 'mul' tool from its implementation file via the tools index.
    export * from "./mul";
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. 'Multiply two numbers' indicates a computational operation but reveals nothing about error handling (e.g., overflow), performance, side effects, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 at three words, with zero wasted language. It is front-loaded and directly states the tool's function without unnecessary elaboration. For a simple arithmetic tool, this brevity is appropriate and efficient.

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

Completeness2/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 (basic multiplication), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It lacks details on parameter semantics, behavioral traits, and usage context, leaving gaps that could hinder an agent's ability to invoke it correctly beyond basic inference.

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?

Schema description coverage is 0%, so the schema only documents parameter types without descriptions. The description adds no meaning beyond the schema—it doesn't explain what 'a' and 'b' represent (e.g., operands, factors) or any constraints. With 0% coverage and two parameters, the description fails to compensate, but the tool's simplicity (multiplication) provides some inherent clarity, warranting a baseline score.

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 'Multiply two numbers' clearly states the tool's function with a specific verb ('Multiply') and resource ('two numbers'). It distinguishes from siblings like 'add', 'div', 'mod', 'sqrt', and 'sub' by specifying multiplication, though it doesn't explicitly contrast with them. The purpose is unambiguous but lacks explicit sibling differentiation.

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' or 'div'. It implies usage for multiplication but offers no context on prerequisites, exclusions, or specific scenarios. Without any when/when-not statements, the agent must infer usage from the tool name alone.

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

Related 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/wrtnlabs/calculator-mcp'

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