Skip to main content
Glama
rog0x

mcp-math-tools

by rog0x

calculate

Safely evaluate mathematical expressions with arithmetic, powers, roots, trigonometry, logarithms, and named variables.

Instructions

Evaluate a mathematical expression safely. Supports: +, -, *, /, ^ (power), % (modulo), sqrt(), abs(), floor(), ceil(), round(), log() (base 10), ln() (natural), sin(), cos(), tan(), min(), max(), pow(), pi, e. Supports named variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variablesNoOptional named variables, e.g. {"x": 5, "y": 10}
expressionYesThe math expression to evaluate, e.g. "2 * (3 + 4) ^ 2"
Behavior3/5

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

With no annotations provided, the description must carry the full burden. It mentions 'safely' and specifies that log is base 10 and ln is natural, which adds behavioral context beyond the schema. However, it does not disclose error handling, return type, or limitations (e.g., no complex numbers). Given the absence of annotations, the description provides some transparency but lacks depth on behavior in edge cases.

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 opens with the primary purpose and then efficiently lists supported operations. It is not overly verbose, and the list is necessary to inform the agent of capabilities. The structure is clear and front-loads the key information. It earns a 4 because the list could be seen as a bit dense, but it is appropriately concise for a calculator tool with many operations.

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 description covers the supported operations and variables, which is adequate for most use cases. However, it does not mention the output format (e.g., returns a number) or error handling for invalid expressions. Given the complexity of the tool (many functions), a note about return values or potential errors would make it more complete. The list of functions is comprehensive, but the lack of detail on edge cases leaves it slightly incomplete.

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?

The schema description covers both parameters at 100%, so the baseline is 3. The description mentions support for named variables but does not add semantics beyond the schema's examples. It lists supported functions but these relate to the expression format, not the parameter definitions. No additional meaning is provided, so it remains at the baseline.

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 that the tool evaluates mathematical expressions and lists the supported operators and functions. It does not explicitly differentiate from siblings like convert_units or statistics, but the general-purpose nature is evident from the list of operations. It is specific enough for an agent to understand its core function, though not as exemplary as explicitly naming a sibling to contrast.

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?

There is no explicit guidance on when to use this tool versus alternatives. The description implies it is for arbitrary math evaluation, but it does not state exclusions or refer to sibling tools. An agent can infer usage from the purpose, but without explicit alternatives, it falls short of providing clear decision criteria.

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/rog0x/mcp-math-tools'

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