Skip to main content
Glama

evaluate_math_or_quant_expression

Evaluate math and quantitative expressions exactly with a deterministic SymPy/NumPy coprocessor, avoiding manual arithmetic and supporting configurable significant-digit precision.

Instructions

Evaluate a math or quant expression exactly with a deterministic SymPy/NumPy coprocessor; use it instead of doing arithmetic in your head.

Cost: $0.002 USDC per call.
Freshness: computed on demand (deterministic, no staleness).
Inputs: expression - for example '(1 + 0.05/12)**120' or 'integrate(x**2, x)'; precision (int, default 12, range 1-100) - significant digits.

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": {
      "expression": "<expression>"
    },
    "name": "evaluate_math_or_quant_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
precisionNo
expressionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does deliver unusual value: per-call cost ($0.002 USDC), determinism, and no staleness. It stops short of covering failure behavior for malformed expressions, supported expression syntax, or whether symbolic results come back in a specific form.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, then labeled lines for Cost, Freshness, and Inputs let an agent scan for what it needs. Every line carries information not present in the schema or annotations; nothing is filler.

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 an output schema present, return values need no explanation, and both parameters are addressed along with cost and determinism. The remaining gap is expression-language scope and error behavior, which matter for a compute tool an agent will call with arbitrary strings.

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 0%, so the description must compensate, and it does add real meaning: two concrete expression examples including a symbolic 'integrate(x**2, x)', plus the precision range 1-100 and its meaning as significant digits, neither of which the schema states. The coverage is partial though, since accepted expression grammar and invalid-input behavior remain undocumented.

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?

States a specific verb and resource (evaluate a math or quant expression) plus the mechanism (deterministic SymPy/NumPy coprocessor) and the exactness guarantee. It does not name or contrast with the closest sibling, calculate_quant_finance_model, so an agent must infer the boundary between generic expression evaluation and domain-specific quant modeling.

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?

The clause 'use it instead of doing arithmetic in your head' gives a genuine usage cue, telling the agent to prefer this over internal computation. However, there is no when-not guidance and no named alternative for cases like full financial models, leaving the boundary with siblings implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.