Skip to main content
Glama

util_calc

Read-only

Exact calculator — Evaluate a math expression exactly instead of guessing: + - * / % ^, parentheses, sqrt, abs, ln, log, exp, trig, round, floor, ceil, min, max, pi, e. Pass ?expr=. Price: $0.001 USDC (Base, via x402).

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": "util_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
exprYesmath expression, e.g. (1200*1.0825)/12

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds the crucial non-schema fact that invocation costs $0.001 USDC on Base via x402, which is exactly the kind of paid/authorization context an agent needs before calling. It stops short of describing the response shape or error behavior on invalid expressions.

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 capability statement is front-loaded in the first clause, and the function list is packed into a single dense sentence with no filler. The pricing sentence is separate and short, earning its place as decision-relevant 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?

For a one-parameter, read-only utility with no output schema, the definition covers purpose, valid input grammar, and the payment requirement. The only real gap is that it does not say what the result looks like (exact numeric string vs float) or how errors are surfaced, which matters somewhat for an 'exact' calculator.

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?

Schema coverage is 100% and the single 'expr' parameter is already documented with an example, so the baseline is 3. The description goes further by enumerating the accepted grammar (operators, parentheses, sqrt/ln/log/exp/trig/round/min/max/pi/e) and the '?expr=' passing convention, which meaningfully tells the agent what is valid input rather than just where to put a string.

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?

The description pairs a specific verb ('Evaluate') with a specific resource ('a math expression') and enumerates the supported operators and functions, so an agent knows exactly what capability is offered. It implicitly separates itself from siblings like util_convert by emphasizing exact arithmetic evaluation, though it never names an alternative explicitly.

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?

'Evaluate a math expression exactly instead of guessing' gives an implied when-to-use (avoid doing arithmetic mentally), which is genuinely useful routing guidance. However, there are no explicit exclusions, no named alternative tools, and no note about when a conversion or AI tool would be the better choice.

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