Skip to main content
Glama

Math Calculator

MathCalculator
Read-only

Math Calculator: Math Calculator performs mathematical operations including arithmetic, number properties, base conversions, and expression evaluation. (Cost: 1 credit)

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": {
      "operation": "<operation>"
    },
    "name": "MathCalculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNoFirst number
bNoSecond number
nNoIndex in Fibonacci sequence (0-1000)
hexNoHex string (for fromHex)
angleNoAngle unit for trigonometric functions: rad (default) or deg
valueNoValue to convert (for baseConvert)
binaryNoBinary string (for fromBinary)
numberNoNumber to operate on
toBaseNoTarget base 2-36 (for baseConvert)
fromBaseNoSource base 2-36 (for baseConvert)
operationYesOperation to perform
variablesNoValues for names used in the expression, comma-separated (e.g., x=4,y=2.5)
expressionNoThe expression to evaluate (e.g., 2^10 + sqrt(16), sin(pi/2), x^2 + 3x with variables x=4). Up to 500 characters

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNoError message, null on success
statusNo"ok" on success

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.6/5.0
Behavior3/5

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

The annotations already state readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered. The description adds one piece of non-schema context, a cost of 1 credit, and implies pure computation, but says nothing about precision, error behavior, or limits beyond the expression-length note already in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The entry is short and front-loaded, but it wastes words restating the tool name twice ('Math Calculator: Math Calculator ...') and the category list is broad rather than informative. The parenthetical cost note is placed at the end where it reads as an afterthought.

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?

For a tool with 13 parameters and one required dispatch parameter with no enum, the description is too thin: it should at minimum name the supported operations so the other parameters' roles become clear. Presence of an output schema excuses it from explaining return values, but the input side remains underspecified.

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?

Schema coverage is 100%, which sets a baseline of 3, but the description adds no meaning and, critically, nowhere enumerates the valid values of the required 'operation' parameter. With 13 optional parameters whose relevance depends entirely on that operation, an agent can only infer parameter applicability from the schema examples, and the description does nothing to close that gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a resource and a verb class ('performs mathematical operations') and lists categories such as arithmetic, number properties, base conversions and expression evaluation. However, it never says which operations exist (the schema only says 'Operation to perform' with example 'add'), and it never differentiates itself from siblings like NumberBaseConverter, FibonacciGenerator, or RomanNumeralMath, which cover some of the same ground.

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?

There is no guidance on when to choose this tool rather than the sibling converters or generators, and no prerequisites or exclusions are stated. The only usage-adjacent sentence is the cost note, which does not help an agent decide between alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.