Skip to main content
Glama
AbderY
by AbderY

evaluate

Compute the numeric value of a mathematical expression safely in a sandbox. Supports operators, constants, and functions like sqrt, sin, log, and factorial.

Instructions

Evaluate a mathematical expression and return its numeric value.

Supports + - * / // % **, parentheses, the constants pi, e, tau and functions such as sqrt, sin, cos, log, exp, factorial, gcd, hypot. Evaluation is sandboxed: no Python eval is used and only whitelisted names are allowed.

Example: "sqrt(2) * sin(pi / 4)" -> 1.0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/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 does substantial work: it discloses sandboxed evaluation, that no Python eval is used, and that only whitelisted names are allowed — real safety-relevant behavior. It stops short of stating error behavior for malformed expressions, unsupported names, or long computations.

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?

The purpose sentence is front-loaded, followed by capabilities, then the sandbox guarantee, then a concrete example. Every sentence 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 values need not be explained, and the description still sketches the numeric result. Supported syntax and the sandbox model are covered; error/edge-case behavior for invalid input is the only notable omission for this one-parameter tool.

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% and the single 'expression' parameter has only a type, so the description must compensate — and it does, enumerating accepted operators, constants (pi, e, tau), supported functions, and giving a worked example with an expected result. Minor gap: no statement about what forms are rejected.

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 names a specific verb ('evaluate') and resource ('a mathematical expression') and states the output type ('numeric value'), which distinguishes it from the symbolic siblings like simplify_expression, expand_expression, and differentiate. An agent can tell it apart from the manipulation tools without opening any schema.

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?

The numeric-result framing implicitly separates it from symbolic tools, but there is no explicit when-to-use statement, no named alternative, and no exclusions. The agent must infer that this is the numeric path while the symbolic siblings are the rewrite paths.

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