Skip to main content
Glama

analysis_math_eval

Evaluate arithmetic expressions safely with operators, functions, and constants like sqrt and pi—no code execution required.

Instructions

Safely evaluate an arithmetic expression: + - * / // % **, parentheses, sqrt/sin/cos/tan/log/exp/abs/floor/ceil/round/min/max and pi/e/tau. No code execution.

Input Schema

NameRequiredDescriptionDefault
expressionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does deliver on the most important traits: "Safely" plus "No code execution" asserts a sandboxed, side-effect-free evaluation rather than arbitrary code. It does not cover error behavior (malformed expressions, division by zero) or numeric precision/return type, leaving some behavioral gaps.

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?

Two sentences, front-loaded with the core action and the safety guarantee, then a dense grammar list. No filler or redundancy; every clause adds information an agent would otherwise have to guess.

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?

An output schema exists, so return-value description is correctly omitted, and the input grammar is fully enumerated. For a one-parameter evaluator the definition is nearly complete; only failure modes and result type/numeric precision are undocumented.

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 description coverage is 0% — the single `expression` parameter has no documentation in the schema. The description compensates well by enumerating the exact grammar (operators, parentheses, supported functions, and pi/e/tau constants), which is the semantic detail an agent needs. Minor gaps remain around whitespace handling and error responses.

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?

The description gives a specific verb ("evaluate") and resource ("arithmetic expression"), then enumerates the supported operators, functions, and constants. This makes it unmistakable next to siblings like analysis_stats, analysis_linear_regression, or system_run_command.

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 only implied: the enumerated grammar tells an agent what this tool accepts, and "No code execution" hints that system_run_command is the wrong choice for arbitrary scripting. There is no explicit when-to-use/when-not statement or named alternative, so the agent must infer the routing.

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