Skip to main content
Glama
Calculator MCP Server

Calculator MCP Server

Subtract

Calculates the difference between two numbers by subtracting the second from the first, returning the result for arithmetic workflows.

Instructions

Subtracts the second number from the first number and returns the difference

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "Subtract"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesFirst Number
bYesSecond Number

Output Schema

NameRequiredDescriptionDefault
aYesFirst Input Number
bYesSecond Input Number
resultYesDifference between the first and the second number
operationYesOperation performed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full disclosure burden; it states the computation and that a difference is returned, implying a pure, side-effect-free operation. It stops short of explicitly asserting no mutation or that operand order is the only failure mode, so it is strong but not exhaustive.

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?

A single front-loaded sentence with no filler; every clause contributes and the operand-order detail is placed where an agent will read it first.

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?

With an output schema present, return values need no explanation, and both required numerics are fully documented in the schema. For a two-parameter arithmetic tool the description covers everything an agent needs to invoke it correctly.

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 100% and the parameters are merely labeled "First Number" and "Second Number," which does not by itself resolve which operand is subtracted from which. The description adds that mapping, supplying real 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?

States a specific verb and resource ("Subtracts") and pins down operand order precisely ("the second number from the first"), which is the one ambiguity in a subtraction tool. An agent can distinguish it from Add, Divide, Multiply, or Percentage without opening any schema.

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?

There is no stated when-to-use or when-not guidance, but for a deterministic arithmetic primitive the usage is largely self-evident from the verb. Guidance is only implied, which fits the minimum-viable level rather than an explicit recommendation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools