Skip to main content
Glama

calculate

Perform basic arithmetic operations such as addition, subtraction, multiplication, and division on a given expression to get the result.

Instructions

Safely calculate basic arithmetic, for example (25 * 4) + 10.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 for behavioral disclosure. The word 'safely' suggests a pure, side-effect-free operation, which is a useful trait. However, it does not disclose edge-case behavior like operator support, error handling, or precision limits. For a calculator tool, 'safely' plus 'basic arithmetic' gives a basic picture but leaves room for more detail, warranting a mid-score.

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 that states the purpose and gives an example. There is zero redundancy and every word contributes to understanding. The example is placed early, reinforcing the purpose immediately. This is an exemplar of concise, structured tool documentation.

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?

The tool has a single parameter and an output schema, so return format is covered. The description mentions 'basic arithmetic' and an example, which covers the core usage. However, it omits details like the set of supported operators, handling of division by zero, or error messages. For a simple calculator this might be adequate, but it leaves some gaps that an agent might need, especially since no annotations exist. A 3 reflects that it is functional but not thorough.

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 0%, so the description must compensate. It provides one concrete example ('(25 * 4) + 10') which illustrates the expected string format and suggests operator usage (parentheses, multiplication, addition). This goes beyond the bare schema but does not fully specify syntax rules, allowed operators, or precedence behavior. The example is helpful but partial, making 3 appropriate.

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 a specific verb ('calculate') and a well-defined resource ('basic arithmetic') with a concrete example. It unambiguously distinguishes itself from siblings like get_current_time and find_student, which serve entirely different purposes. An agent can instantly tell what this tool does without needing to open the schema.

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?

The description gives a sense of scope ('basic arithmetic') but does not explicitly state when to use this tool versus alternatives or when not to use it. There is no mention of exclusions such as more complex math or non-arithmetic calculations. The example implies usage, but no explicit routing or conditions are provided. Siblings are unrelated, so the context is clear enough, but formal guidance is missing.

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/massssssssssna/MCP-tested'

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