Skip to main content
Glama
devantage

MCP Calculator

by devantage

expression_eval

Evaluates mathematical expressions with variable substitution, supporting arithmetic, comparisons, and functions like sin, cos, log, sqrt.

Instructions

Evaluate mathematical expressions with variable substitution.

Supports +, -, *, /, %, ^ (power), parentheses, comparison/logical operators, the constants pi/e (and PI/E), and the functions sin, cos, tan, asin, acos, atan, log (base 10), ln, sqrt, pow, abs, exp, factorial. Variable names must start with a letter and may not collide with reserved names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variablesNo
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It goes beyond the schema by listing supported operators, functions, constants, and variable naming constraints (must start with a letter, no reserved names). However, it does not mention error handling or edge cases, though the output schema may cover return formatting.

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 three sentences, front-loaded with the core purpose, followed by a dense but relevant list of supported features and variable rules. Every sentence provides distinct information and there is no filler.

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 moderately complex expression evaluator, the description covers expression syntax, operators, functions, constants, and variable constraints. The presence of an output schema likely covers the return structure, so the missing error-handling details are a minor gap. Overall, it is sufficiently complete for an agent to invoke the tool correctly.

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 coverage is 0%, so the description must compensate. It does by explaining the expression syntax and variable substitution rules, including the constraint that variable names must start with a letter and avoid reserved names. This adds meaningful context to the otherwise bare 'expression' and 'variables' parameters.

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 'Evaluate mathematical expressions with variable substitution,' naming a specific verb and resource. The mention of variable substitution and the extensive list of supported operators/functions distinguishes it from sibling tools like basic_math or advanced_math.

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 implies usage for evaluating expressions with variables, but it does not explicitly state when to use this tool over alternatives or when not to use it. There is no comparison with sibling tools or exclusion criteria, making the guidance only implicit.

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/devantage/mcp-calculator'

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