Skip to main content
Glama

calculator

Safely evaluate mathematical expressions with arithmetic, powers, parentheses, and functions like sqrt, sin, log. Includes constants pi and e.

Instructions

Evaluate a mathematical expression safely. Supports +, -, *, /, %, ^ (power), parentheses, and functions: sqrt, abs, sin, cos, tan, asin, acos, atan, log (base 10), ln (natural), exp, floor, ceil, round. Constants: pi, e. Example: 'sqrt(16) + 2^3' = 12

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesThe mathematical expression to evaluate, e.g. '2 + 3 * 4' or 'sqrt(144) + pi'
Behavior3/5

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

No annotations are provided, so the description carries the burden. It mentions 'safely' implying no side effects, but does not elaborate on error handling, return format, or limits. For a calculator, this is adequate but not exceptional.

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 are optimally concise: the first states purpose and safety, the second lists capabilities with an example. No filler—every sentence earns its place.

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

Completeness5/5

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

Despite no annotations or output schema, the description is complete for a calculator tool: it covers all supported operations, constants, and provides a clear example. Additional details like return type are unnecessary given the tool's simplicity.

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 100% with a basic explanation. The description adds significant value by detailing supported operators, functions, constants, and an example, going well beyond the schema's minimal 'mathematical expression' note.

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 ('mathematical expression'), lists supported operations, functions, and constants, and provides an example. It clearly distinguishes from sibling tools which are unrelated (search, text, datetime, etc.).

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?

Although no explicit when-not or alternative tools are mentioned, the description makes it obvious this tool is for math evaluation. Given the sibling context, there is no ambiguity, so it scores well but lacks formal usage boundaries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Microbiosis/mini-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server