Skip to main content
Glama

Evaluate & cross-check a math expression

evaluate
Read-only

Verify numeric results by evaluating expressions on four independent engines in parallel, revealing disagreements that expose 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 4 independent engines (multiprecision, decimal, IEEE 754 double, interval arithmetic) in parallel and returns every result plus per-engine precision diagnostics, so disagreement exposes an unreliable value that a single calculation would hide.

The 4 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?

The description discloses that the tool uses 4 independent engines with parallel evaluation, explains behavior around singularities, branch cuts, and ties, and notes that precision is capped at 50. The readOnlyHint annotation is consistent with the description's read-only nature. The description adds significant behavioral context beyond the annotation.

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 well-structured with a clear opening, usage context, detailed behavioral notes, and a pointer to the sibling tool. While it is verbose, each section adds value. It could be slightly more concise, but it remains well-organized for the tool's complexity.

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, the description covers purpose, usage, syntax rules, engine behavior, precision limits, and guidance. The output schema exists, so return value details are not required. The description is complete for an agent to use the tool effectively.

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?

The input schema has 100% description coverage, but the description adds extra semantics such as explicit multiplication requirement, precedence rules, supported functions, and defaults for format and precision. This enhances meaning beyond the schema alone.

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 that the tool evaluates and cross-checks math expressions using multiple engines for trustworthy results. It explicitly distinguishes itself from the sibling tool list_functions, which merely lists available functions.

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 provides explicit guidance on when to use the tool ('whenever the correctness of a number matters') and states a preference over manual computation or running code. It also directs to the sibling list_functions for the authoritative function list, offering clear context 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