Skip to main content
Glama
slettmayer

calc-mcp-server

by slettmayer

calculate

Evaluate arithmetic expressions with exact arithmetic, supporting functions like sqrt and sin, and avoiding float64 errors and unsafe eval.

Instructions

Evaluate an arithmetic expression and return the result.

Args:
    expression: The expression to evaluate, for example "2 + 3 * (4 - 1)",
        "sqrt(16) + sin(pi/2)" or "123456789 * 987654321". `^` is accepted
        as a power operator; `×` and `·` as multiply, `÷` as divide, and
        `−` (U+2212) as minus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses accepted operator symbols (`^`, `×`, `÷`, `−`) and shows function examples (sqrt, sin), adding meaningful behavioral detail. It does not explicitly state that the operation is non-destructive, but that is strongly implied for a 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured: a clear one-sentence summary followed by a brief parameter explanation. The examples and operator notes are valuable, though slightly verbose.

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?

For a simple calculator with one parameter, the description is complete: it explains the parameter, accepted syntax, and examples. Since an output schema exists, return-value details are not needed. No annotations are required for such a safe operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only defines 'expression' as a string with no description, so schema coverage is 0%. The description compensates fully by explaining what the expression should look like, providing multiple examples, and documenting accepted operator aliases.

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 clearly states the tool evaluates an arithmetic expression and returns the result. This is a specific verb+resource ('Evaluate expression') that fully conveys the tool's purpose.

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 implied: the description gives examples of valid expressions, indicating when to use the tool (when arithmetic evaluation is needed). However, there is no explicit when/when-not guidance or mention of alternatives, though no siblings exist.

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/slettmayer/calc-mcp-server'

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