Skip to main content
Glama

Lordevo Shop (x402 website checks)

Exact calculator: arithmetic, fractions, big integers, functions ($0.002/call)

math_eval
Read-onlyIdempotent

$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Evaluates a math expression exactly: + - * / % ^ !, parentheses, big integers and fractions (1/3 stays 1/3), plus sqrt, round, floor, min, max, mean, gcd, lcm, comb, perm, ln, log, exp and trig (radians; deg constant). Returns result, fraction, decimal to N places, repeating decimal and whether it is exact. Input: expr, optional decimals 0-100. Limits: 1,000 characters, 10,000-digit values. Offline.

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
exprYesMath expression, up to 1,000 characters, e.g. sqrt(16/9) + cbrt(-27) + 8^(1/3) or comb(52, 5): numbers, + - * / % ^ ! ( ), functions like sqrt(), round(x, 2), constants pi, e, deg
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.
decimalsNoDecimal places in "decimal", 0-100 (default 20)20

Output Schema

NameRequiredDescriptionDefault
toolNo
cacheNo
exactNo
notesNo
_trialNoPresent when the call was a free trial call.
digitsNo
numberNo
resultNo
decimalNo
integerNo
roundedNo
decimalsNo
fractionNo
providerNo
price_usdNo
repeatingNo
expressionNo
scientificNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed1 schema field changed
    • changedInput schema / properties / expr / description
      Previous value: -"Math expression, up to 1,000 characters: numbers, + - * / % ^ ! ( ), functions like sqrt(), round(x, 2), comb(n, k), constants pi, e, deg"New value: +"Math expression, up to 1,000 characters, e.g. sqrt(16/9) + cbrt(-27) + 8^(1/3) or comb(52, 5): numbers, + - * / % ^ ! ( ), functions like sqrt(), round(x, 2), constants pi, e, deg"
  3. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "result",
      +        "exact"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "decimal": {
      +      "type": "string"
      +    },
      +    "decimals": {
      +      "type": "integer"
      +    },
      +    "digits": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "exact": {
      +      "type": "boolean"
      +    },
      +    "expression": {
      +      "type": "string"
      +    },
      +    "fraction": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "integer": {
      +      "type": "boolean"
      +    },
      +    "notes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "number": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "repeating": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "result": {
      +      "type": "string"
      +    },
      +    "rounded": {
      +      "type": "boolean"
      +    },
      +    "scientific": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered; the description adds genuinely new behavior: hard limits (1,000 character expressions, 10,000-digit values), off-line execution, cost per call, and the exactness guarantee (1/3 stays 1/3, repeated decimals reported). The only omission is how non-numeric or unsupported input is reported (error versus best-effort), which keeps it from a 5.

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-loads price, then purpose, then capabilities, then input and limits - a sensible ordering for an agent scanning for cost and fitness. It is dense with enumerations (operators, function list) and the '[Data utilities]' tag adds little, but virtually every clause carries usable information.

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?

With a full input schema and an output schema present, the definition only needs to establish scope, limits, determinism and cost - all of which it does, including trig being in radians and the 'deg' constant. Minor gap: no statement about failure behavior for malformed expressions or what the cost implication is for retries.

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 100% and the schema already documents expr syntax, the trial semantics, and the 0-100 decimals range with a default. The description restates 'Input: expr, optional decimals 0-100' without adding format or edge-case meaning beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Evaluates a math expression exactly') and enumerates the supported operator and function surface, so the agent knows precisely what class of work this covers. It is clearly distinct from adjacent numeric siblings such as unit_convert or date_calc, which handle unit and date semantics rather than exact symbolic arithmetic.

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 capability list ('exact' evaluation, offline, big integers/fractions) but there is no explicit when-to-use versus when-not, and no routing to siblings like unit_convert for unit-bearing expressions. The only explicit alternative routing is the free-trial path via 'trial': true or try_free, which is a billing decision, not a task-selection one.

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