Skip to main content
Glama

Scientific calculator

calc_expression
Read-onlyIdempotent

Evaluate mathematical expressions safely with a built-in parser, supporting functions, variables, constants, factorials, percentages, and angle units without using eval.

Instructions

Evaluate a maths expression safely with the website's own parser (never eval): + − × ÷ ^ (right-associative), implicit multiplication (2(3+4), 2x), postfix ! and %, √, brackets; functions sin cos tan sec csc cot (+ asin acos atan atan2) in degrees (default), radians or grads, sinh cosh tanh and inverses, sqrt cbrt root(x,n) abs exp ln log(x[,base]) log10 log2 floor ceil round sign min max mod nCr nPr fact gamma; constants pi π e tau phi; "ans" and your own variables. Results to 12 significant digits, plain or scientific notation. Web version: https://s3eidat.github.io/sci-calc/

Input Schema

NameRequiredDescriptionDefault
ansNoValue of "ans" (the previous answer). Default 0.
angleNoAngle unit for trig functions.deg
formatNoDisplay: normal, or always scientific notation.norm
variablesNoVariables to use, e.g. {"x": 2, "r": 5}.
expressionYesThe expression, e.g. "sin(30) + 2^3^2", "5!/(2!×3!)", "200×15%".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-open-world behavior. The description adds valuable traits beyond that: safe parsing with no eval, 12-significant-digit results, and plain/scientific output modes.

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 core purpose is front-loaded, and the dense function/constant lists earn their place for a scientific calculator. Structure is weaker because most information is packed into one long semicolon-separated sentence, but there is little pure filler.

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 complex expression evaluator with no output schema, the description is highly complete: it covers syntax, safety, angle units, variables, ans, precision, and output format. An agent has enough information to call it correctly.

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?

Schema coverage is 100%, but the description adds substantial meaning beyond the schema by documenting the expression language: operators, precedence, implicit multiplication, postfix operators, trig units, supported functions, constants, ans, and variables.

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 names the exact action and resource: evaluate a maths expression safely with the site's own parser. It distinguishes itself from broader calculator siblings by specifying expression syntax, functions, constants, and precision.

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 by 'Evaluate a maths expression', but the description never states when to choose this over calc_equation, calc_percentage, or other calc siblings. There are no explicit exclusions or routing cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools