Skip to main content
Glama

math

Evaluate arithmetic expressions using addition, subtraction, multiplication, division, and parentheses. Get the result for any valid expression like '(2 + 3) * 4'.

Instructions

Evaluate a math expression (add, subtract, multiply, divide, parentheses)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesMath expression to evaluate, e.g. '(2 + 3) * 4'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It states the core action and supported operations but does not disclose the return type (e.g., number), order-of-operations precedence beyond parentheses, or error behavior for invalid expressions. This is minimal but not misleading for a simple calculation tool.

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 description is a single, front-loaded sentence with no filler. Every element—the verb, the resource, and the supported operations—earns its place, making it easy to parse quickly.

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, no-output-schema tool, the definition is nearly sufficient. It is missing explicit return-value and error-handling statements, but the expected result (evaluated number) is strongly implied by 'Evaluate' and the example, so the gap is minor.

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?

The schema already documents the sole parameter with a clear example, giving 100% coverage. The description's list of operations adds some context but largely restates what the example already implies, so it does not meaningfully exceed the schema baseline.

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 uses a specific verb ('Evaluate') and resource ('math expression'), and lists supported operations. This is immediately distinct from sibling tools that deal with strings, hashes, timestamps, or DOM scraping, so purpose is unmistakable.

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

Usage Guidelines4/5

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

The description provides a clear context: use it for arithmetic evaluation. It does not explicitly name alternatives or exclusions, but the sibling tool list makes the appropriate use-case obvious, so this is above vague but not fully explicit.

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