Skip to main content
Glama

FMF Tools Utilities

math_eval

Evaluate math expressions (64-digit precision, units, matrices) ($0.001 per call, paid via MPP on Tempo). Evaluate one or many expressions with 64-significant-digit arithmetic: functions, constants, complex numbers, matrices, statistics, combinatorics, and unit arithmetic/conversion ("5 km/h to m/s", "2 inch * 3 cm to cm^2"). Variables via scope or earlier lines (x = 3; x^2). Sandboxed parser, no code execution. HTTP POST https://mpp-tools.fmf-x402.workers.dev/mpp/math/eval. This MCP wrapper does not settle payment by itself; call with an MPP Payment Authorization header, or use mppx against the HTTP route.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "math_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
exprNo
exprsNoup to 50, evaluated in order with a shared scope
scopeNovariables, e.g. {"x": 2}
precisionNosignificant digits in result strings, 1-64 (default 14)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses 64-significant-digit arithmetic, a sandboxed parser with no code execution, a per-call price ($0.001 via MPP on Tempo), and — critically — that the MCP wrapper does not settle payment, requiring an MPP Payment Authorization header or the mppx client against the raw HTTP route. Cost and authentication prerequisites are exactly the behavioral facts an agent cannot get from schema or annotations.

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 capability, then examples, then constraints, then transport/payment — a sensible order and no filler sentences. It is dense with parenthetical asides and the raw endpoint URL plus payment paragraph lengthen it, but each element (precision, sandboxing, cost, auth) earns its place.

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?

There is no output schema and no annotations, so the description must define both capability and contract; it does cover capability, precision, sandboxing, cost and payment routing. It is thin on output shape — when exprs is given it is unclear whether results come back as an array, and error behavior for a malformed expression or failed payment is unstated — which matters for a paid batch tool.

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 coverage is 75%, so the schema already documents exprs (up to 50, shared scope), scope ({"x": 2}) and precision (1-64, default 14). The description adds real meaning about variable assignment via earlier lines ("x = 3; x^2" is evaluated as a line sequence, not a single expression), which is beyond the schema text. But it never resolves the most important ambiguity: zero required parameters means expr vs exprs is effectively optional, and the description does not say they are alternatives, nor what happens if both or neither are supplied.

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?

Opens with a concrete verb+resource ("Evaluate math expressions") and immediately enumerates the domain (64-digit precision, units, matrices). It clearly distinguishes itself from a plain calculator and implies a broader scope than math_convert/math_symbolic by naming statistics, combinatorics and unit conversion, but it never names a sibling to explicitly contrast with.

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 context is conveyed by rich examples ("5 km/h to m/s", "2 inch * 3 cm to cm^2", "x = 3; x^2") and by mentioning batch evaluation via exprs, so an agent can infer supported scenarios. However, there is no explicit when-to-use/when-not guidance and no routing against the obvious alternatives math_convert and math_symbolic — an agent told 'convert 5 km/h to m/s' has no stated reason to prefer this over math_convert.

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