Skip to main content
Glama

calc_expression

Evaluate mathematical expressions safely with support for functions like sqrt, sin, cos, and constants including PI. Specify decimal precision for accurate calculations.

Instructions

Evaluate math expression safely. Supports sqrt, sin, cos, PI, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesMath expression (e.g., 2+2, sqrt(16), sin(PI/2))
precisionNoDecimal precision (default: 10)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'safely' which implies some safety mechanism but doesn't specify what that entails (e.g., sandboxing, input validation, error handling). It lists supported functions but doesn't describe behavioral traits like performance characteristics, error conditions, or output format. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 extremely concise at just two short sentences. The first sentence states the core purpose, and the second provides useful examples of supported functions. There is zero wasted language or redundancy, making it easy to parse and understand quickly.

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?

For a simple calculation tool with 2 parameters and 100% schema coverage, the description is adequate but has gaps. No output schema exists, so the description doesn't explain what the tool returns (numeric result, error format). No annotations are provided, so behavioral aspects like safety guarantees aren't detailed. The description covers the basic purpose but leaves important contextual questions unanswered.

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%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'Supports sqrt, sin, cos, PI, etc.' which provides examples of functions but doesn't explain parameter semantics beyond what's in the schema descriptions. With high schema coverage, the baseline of 3 is appropriate.

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?

The description clearly states the tool's purpose: 'Evaluate math expression safely' specifies the verb (evaluate) and resource (math expression). It distinguishes from sibling tools like calc_statistics and calc_unit_convert by focusing on expression evaluation rather than statistical analysis or unit conversion. However, it doesn't explicitly mention how it differs from other calculation tools beyond listing supported functions.

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 description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to other calculation tools like calc_statistics or calc_unit_convert, nor does it specify any prerequisites or constraints for usage. The agent must infer usage context from the tool name and description alone.

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/ShunsukeHayashi/miyabi-mcp-bundle'

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