Skip to main content
Glama
YasogaN

Math MCP Server

by YasogaN

evaluate

Evaluates any mathematical expression, from arithmetic to calculus, with numeric or symbolic mode for exact results.

Instructions

Evaluates any mathematical expression using mathjs. Supports arithmetic, trigonometry (sin, cos, tan, pi, e), algebra, calculus (derivative, integrate), complex numbers (2+3i), fractions, BigNumber precision (bignumber()), matrices (det, inv, transpose), logic, and units. Use mode='symbolic' for exact symbolic results via Algebrite. Examples: '2^10', 'sin(pi/4)', 'det([[1,2],[3,4]])', 'derivative("x^3", "x")', 'integrate(x^2, x, 0, 1)'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesThe mathematical expression to evaluate
modeNoEvaluation mode: numeric (default, uses mathjs) or symbolic (uses Algebrite)
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the underlying libraries (mathjs, Algebrite) and mode behavior (numeric vs symbolic). However, it omits error handling, output format, side effects, or permission requirements. For a computation tool, the description is adequate but not fully transparent.

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, well-structured paragraph that front-loads the core function ('Evaluates any mathematical expression using mathjs'), then lists supported operations, introduces the symbolic mode, and provides illustrative examples. Every sentence adds value without redundancy.

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?

Given the tool's complexity and absence of output schema, the description is moderately complete. It covers capabilities and modes but fails to specify the return format (e.g., numeric value, string, object) or error behavior. For a tool with extensive functionality like calculus and matrices, this is a notable gap.

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 100%, so baseline is 3. The description adds significant value by providing concrete examples and listing supported expression types (e.g., 'det([[1,2],[3,4]])'), which goes beyond the schema's basic description of 'expression' as a string. The mode parameter is further clarified with defaults and library names.

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 mathematical expressions using mathjs, with specific verb 'Evaluates' and resource 'mathematical expression'. The comprehensive list of supported operations (arithmetic, trigonometry, calculus, etc.) effectively distinguishes it from sibling tools like expand or factor, which handle specific transformations.

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 does not explicitly state when to use this tool versus alternatives. It implies general applicability with 'any mathematical expression' but lacks explicit when-not-to-use guidance or comparison with sibling tools. The mode parameter is explained, but no exclusions are provided.

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

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