Skip to main content
Glama

Lordevo Shop: website checks for agents (x402)

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

math_eval
Read-onlyIdempotent

$0.0021 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

A4.4/5.0
Behavior5/5

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

Annotations only cover safety (readOnly, idempotent, closed-world); the description adds the things an agent actually needs: exactness semantics (1/3 stays 1/3), the returned fields, 1,000-character and 10,000-digit limits, default decimal places, pricing, and that it runs offline. That is substantial behavior beyond the structured fields.

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?

One dense paragraph that front-loads cost and purpose before capability and limits; nearly every clause carries information. It is slightly overpacked — pricing prose and the "[Data utilities]" tag interleave with the functional spec — but nothing is truly wasted.

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?

For a fixed-arity expression evaluator with an output schema, this covers everything needed to call it correctly: input format, limits, optional parameters, payment/trial path, and offline status. No call-critical detail is missing.

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 100%, so expr, decimals, and trial are already documented, and the description largely restates them (decimals 0-100, trial for free calls). It adds only marginal meaning, such as trig being in radians with a deg constant, which the schema also mentions.

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," then enumerates the operator set, functions, and exact-fraction behavior, which distinguishes it from siblings like date_calc or json_query. An agent knows immediately this is the arithmetic engine.

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

Usage Guidelines4/5

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

It names the free-trial path (\"trial\": true or try_free) and the per-call price, which is real routing guidance for a cost-bearing tool, and it scopes usage with hard limits. It stops short of explicitly saying when NOT to use it (e.g., approximate/symbolic math elsewhere), so it is clear context without exclusions.

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