Skip to main content
Glama

Evaluate & cross-check a math expression

evaluate
Read-only

Verify numeric results by evaluating expressions across 5 independent numeric engines; divergence exposes unreliable values.

Instructions

Verify any numeric result that has to be trusted, via the Ultimath API (https://ultimath.ai). Use this whenever the correctness of a number matters — floating-point-sensitive expressions, catastrophic cancellation, values near singularities or branch cuts, ties, or any computation where a single method could be silently wrong. Prefer it over computing by hand or running code: it evaluates the expression on 5 independent engines (multiprecision ball, exact decimal, IEEE 754 double, interval arithmetic, arbitrary-precision binary) in parallel and returns every result plus per-engine precision diagnostics, so disagreement exposes an unreliable value that a single calculation would hide.

The 5 engines are independent and each computes with its own native primitive — so divergence between them (at poles, singularities, branch cuts, or ties like round(2.5)) is the backends' real behavior, NOT a bug. Agreement across engines is a confidence signal; divergence flags a value that is convention-dependent or near a domain edge — verify it rather than trust a single column.

Supports: arithmetic, trigonometry (sin, cos, tan), exponentials and logs (exp, ln, log), roots and powers (sqrt, x^y), factorial, complex numbers (3+2i), arbitrary bases (0xFF, 0b1010), constants (pi, e, the golden ratio PHI). Multiplication must be EXPLICIT: write 2pi, 2(3+4), (a+b)(c+d), 2sin(x) — adjacency is NOT a product (2pi is an error). Precedence, tightest first: postfix factorial ! (2^3! = 2^(3!) = 64), then powers ^, then * / %, then + -. Note: expressions are mathematical only — there are no type casts ((int)x) or constructors (complex(1,2)); write a complex number as 1+2i or (re, im). Call list_functions for the authoritative list of available functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (default 'fixed')
precisionNoDecimal digits of precision (default 50). The free beta caps at 50; higher values are rejected server-side.
expressionYesMath expression, e.g. '0.1 + 0.2', 'sin(pi/4)', 'sqrt(2)^2 - 2', '2*pi', '2*(3+4)', 'factorial(10)'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
msNo
traceNo
enginesYesPer-engine results, compare to detect floating-point error
inexactYesTrue if any engine emitted a warning (precision loss or domain issue somewhere)
angle_unitNo
expressionYes
Behavior5/5

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

Beyond the readOnlyHint annotation, the description details that the tool uses 5 independent engines, returns per-engine precision diagnostics, and explains divergence behavior. It also lists supported operations, syntax requirements (e.g., explicit multiplication), and precedence rules, offering comprehensive behavioral transparency.

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?

The description is front-loaded with the core purpose, but it is lengthy due to the wealth of necessary detail. While every sentence earns its place given the tool's complexity, some slight restructuring could improve readability. It is appropriately sized for the depth needed.

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?

Given the tool's complexity and the existence of an output schema, the description covers all necessary aspects: when to use, behavior, syntax, supported operations, and output diagnostics. It is fully self-contained for an agent to understand and invoke the tool 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?

While the input schema already describes all three parameters (100% coverage), the description adds significant context: it explains the precision cap (50), the format options, and critical expression syntax rules (e.g., explicit multiplication, complex number notation). This adds meaningful value 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?

The description clearly states the tool's purpose: 'Verify any numeric result that has to be trusted' using a multi-engine cross-check. It distinguishes itself from the sibling 'list_functions' by focusing on evaluation and verification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises when to use the tool: 'Use this whenever the correctness of a number matters... Prefer it over computing by hand or running code.' It also references the sibling tool 'list_functions' for the authoritative function list, providing clear guidance on alternatives.

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

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/Flupke68/ultimath-mcp'

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