Skip to main content
Glama

Lookup Kit

math_eval

Read-only

Calculator, math expression evaluator with exact decimal arithmetic. Evaluate a maths expression exactly with decimal arithmetic (0.1+0.2 = 0.3): + - * / ^ %, brackets, sqrt, abs, round(x, places), floor, ceil, ln, log, exp, sin, cos, tan, min, max, mod, pi, e. A safe parser: no code is run. Input: expr. Output: result (string, exact), number. Price: $0.001 per call (x402, USDC on Base).

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": {
      "expr": "<expr>"
    },
    "name": "math_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
exprYes
placesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Goes beyond readOnlyHint=true and openWorldHint=false by disclosing that the parser is safe and 'no code is run' (a real safety claim for an eval tool) and by disclosing the cost and payment rail ('$0.001 per call (x402, USDC on Base)'). It stops short of describing failure behavior for malformed expressions or the 500-char limit's consequences.

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

Conciseness4/5

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

Front-loaded with purpose then evidence, with pricing and input/output shape at the end. The long function enumeration is verbose but each entry is functional capability the caller must know; only the 'Price' sentence could be trimmed to fit better as a metadata field.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no output schema, it supplies both input and output shape ('result (string, exact), number'), the safety posture, and cost. The remaining gap is the unexplained places parameter, which is the only thing an agent could plausibly get wrong.

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 description must carry the burden; it does explain expr ('Input: expr') and gives an illustrative signature 'round(x, places)' that hints at the places parameter. But it never states that places is a top-level default-precision parameter (default 20, max 40), leaving the second parameter effectively undocumented.

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?

Names a specific verb and resource ('Calculator, math expression evaluator') and immediately scopes it with 'exact decimal arithmetic' plus an example (0.1+0.2 = 0.3). The supported-operator list makes the boundary against sibling calculators (cidr_calc, compound_interest, distance) obvious without opening the 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?

Usage is implied by the domain rather than stated: the agent can infer 'use this when you need arithmetic' and can infer that exact decimal semantics matter from the example. However, there is no explicit when-to-use/when-not guidance and no pointer to sibling math tools, so it stays at minimum-viable inference.

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.

Resources