Skip to main content
Glama

math_eval

Evaluate a math expression safely with functions, constants and parentheses. Pure CPU, instant.

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
exprYesExpression such as 2*(3+4)^2

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed2 schema fields changed
    • addedInput schema / properties / expr
      Added value: +{
      +  "description": "Expression such as 2*(3+4)^2",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "expr"
      +]
  4. Added

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. 'Safely' implies sandboxed evaluation rather than arbitrary code execution, and 'Pure CPU, instant' discloses no network access and low latency, which is genuinely useful. However, error behavior for malformed expressions and the result type are undisclosed.

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?

Two tight sentences with the core capability front-loaded and no filler. The trailing 'Pure CPU, instant.' is terse but does earn its place as a safety/latency signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (one string parameter, no output schema), but the description never states what comes back (numeric value, string, error format) or which functions and constants are available. For a compute tool with no output schema, those omissions are real gaps an agent would hit in practice.

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 single parameter already carries an example ('2*(3+4)^2'), so the baseline is 3. The description adds useful syntax hints (functions, constants, parentheses are supported) but does not say which functions or constants, so it does not meaningfully exceed the schema.

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 expression') and adds scope detail: functions, constants, parentheses. It loses the top mark because the sibling list contains 'evaluate_math', an apparently identical tool, and nothing here distinguishes the two.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance, and no mention of the near-duplicate sibling 'evaluate_math' or of related numeric siblings like percentage or factorial. The only implicit routing signal is 'Pure CPU, instant', which does not tell an agent which tool to pick.

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