Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
calculateA

Evaluates a mathematical expression and returns the result.

Supports basic operators (+, -, *, /, **, %, ^), mathematical functions (sin, cos, tan, exp, log, log10, sqrt), and constants (pi, e). Uses an AST whitelist for safe execution.

Args: expression: The mathematical expression to evaluate as a string. Examples: "2 + 2", "sin(pi/4)", "sqrt(16) * 2", "log(100, 10)"

Returns: On success: {"result": } On error: {"error": }

Examples: >>> calculate("2 * 3 + 4") {'result': 10} >>> calculate("sin(pi/2)") {'result': 1.0} >>> calculate("sqrt(16)") {'result': 4.0} >>> calculate("(2 + 3)^2") {'result': 25}

Notes: - Use 'x' as the variable (e.g., x2, not x^2) - Multiplication must be explicitly indicated with * (e.g., 2*x, not 2x) - Powers can be represented with ** or ^ (e.g., x2 or x^2)

solve_equationA

Solves an algebraic equation for x and returns all solutions.

The equation must contain exactly one equality sign (=) and use a variable x. Can solve polynomial, trigonometric, and other equations supported by SymPy.

Args: equation: The equation to solve as a string. Format: ' = ' Examples: "x**2 - 5x + 6 = 0", "sin(x) = 0.5", "2x + 3 = 7"

Returns: On success: {"solutions": } On error: {"error": }

Examples: >>> solve_equation("x**2 - 5x + 6 = 0") {'solutions': '[2, 3]'} >>> solve_equation("2x + 3 = 7") {'solutions': '[2]'} >>> solve_equation("x = 0") {'solutions': '[0]'}

Notes: - Use 'x' as the variable (e.g., x2, not x^2) - Multiplication must be explicitly indicated with * (e.g., 2*x, not 2x) - Powers can be represented with ** or ^ (e.g., x2 or x^2)

differentiateA

Computes the derivative of a mathematical expression with respect to a variable.

Supports polynomials, trigonometric functions, exponential functions, logarithms, and other functions supported by SymPy.

Args: expression: The mathematical expression to differentiate as a string. Examples: "x**2", "sin(x)", "exp(x)", "log(x)" variable: The variable with respect to which to differentiate. Default is "x". Optionally, other variables can be specified.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> differentiate("x**2") {'result': '2x'} >>> differentiate("sin(x)") {'result': 'cos(x)'} >>> differentiate("xy", "y") {'result': 'x'} >>> differentiate("exp(x)") {'result': 'exp(x)'}

Notes: - Use mathematical notation with explicit operators (* for multiplication) - Powers can be represented with ** or ^ (e.g., x**2 or x^2) - For trigonometric functions, use sin(x), cos(x), etc. - Only support for one variable at a time (implicit differentiation not supported)

integrateA

Computes the indefinite integral of a mathematical expression with respect to a variable.

Supports polynomials, trigonometric functions, exponential functions, logarithms, and other functions supported by SymPy.

Args: expression: The mathematical expression to integrate as a string. Examples: "x**2", "sin(x)", "exp(x)", "1/x" variable: The variable with respect to which to integrate. Default is "x". Optionally, other variables can be specified.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> integrate("x2") {'result': 'x3/3'} >>> integrate("sin(x)") {'result': '-cos(x)'} >>> integrate("exp(x)") {'result': 'exp(x)'} >>> integrate("1/x") {'result': 'log(x)'} >>> integrate("xy", "y") {'result': 'xy**2/2'}

Notes: - The result is the indefinite integral without the constant of integration - Complex expressions may be returned in simplified form

meanB

Computes the mean of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> mean([1, 2, 3, 4]) {'result': 2.5} >>> mean([10, 20, 30]) {'result': 20.0}

varianceB

Computes the variance of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> variance([1, 2, 3, 4]) {'result': 1.25}

standard_deviationA

Computes the standard deviation of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> standard_deviation([1, 2, 3, 4]) {'result': 1.118033988749895}

medianB

Computes the median of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> median([1, 2, 3, 4]) {'result': 2.5}

modeA

Computes the mode of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> mode([1, 2, 2, 3]) {'result': 2.0} >>> mode([1, 1, 2, 2]) {'result': 1.0} >>> mode([]) {'error': 'Cannot compute mode of empty array'}

correlation_coefficientB

Computes the Pearson correlation coefficient between two lists of numbers.

Args: data_x: The first list of numerical values. data_y: The second list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> correlation_coefficient([1, 2, 3], [4, 5, 6]) {'result': 1.0}

linear_regressionA

Performs linear regression on a set of points and returns the slope and intercept.

Args: data: A list of tuples, where each tuple contains (x, y) coordinates.

Returns: On success: {"slope": , "intercept": } On error: {"error": }

Examples: >>> linear_regression([(1, 2), (2, 3), (3, 5)]) {'slope': 1.5, 'intercept': 0.3333333333333335}

confidence_intervalB

Computes the confidence interval for the mean of a dataset.

Args: data: A list of numerical values. confidence: The confidence level (default is 0.95).

Returns: On success: {"confidence_interval": <(lower_bound, upper_bound)>} On error: {"error": }

Examples: >>> import numpy as np >>> np.random.seed(42) # For reproducible results >>> confidence_interval([1, 2, 3, 4]) # doctest: +ELLIPSIS {'confidence_interval': (0.445739743239..., 4.554260256760...)}

matrix_additionA

Adds two matrices.

Args: matrix_a: The first matrix as a list of lists. matrix_b: The second matrix as a list of lists.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> matrix_addition([[1, 2], [3, 4]], [[5, 6], [7, 8]]) {'result': [[6, 8], [10, 12]]}

matrix_multiplicationA

Multiplies two matrices.

Args: matrix_a: The first matrix as a list of lists. matrix_b: The second matrix as a list of lists.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> matrix_multiplication([[1, 2], [3, 4]], [[5, 6], [7, 8]]) {'result': [[19, 22], [43, 50]]}

matrix_transposeA

Transposes a matrix.

Args: matrix: The matrix to transpose as a list of lists.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> matrix_transpose([[1, 2], [3, 4]]) {'result': [[1, 3], [2, 4]]}

matrix_determinantA

Computes the determinant of a square matrix.

Args: matrix: A square matrix as a list of rows.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> matrix_determinant([[1, 2], [3, 4]]) {'result': -2.0}

vector_dot_productA

Computes the dot product of two equal-length vectors.

Args: vector_a: The first vector as a list of numbers. vector_b: The second vector as a list of numbers.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> vector_dot_product([1, 2], [7, 8]) {'result': 23}

vector_cross_productB

Computes the cross product of two 2D or 3D vectors.

Args: vector_a: The first vector as a list of numbers. vector_b: The second vector as a list of numbers.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> vector_cross_product([1, 2, 3], [4, 5, 6]) {'result': [-3, 6, -3]}

vector_magnitudeA

Computes the magnitude of a vector.

Args: vector: A vector as a list of numbers.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> vector_magnitude([1, 2, 3]) {'result': 3.7416573867739413}

plot_functionA

Plots a graph of y = f(x).

Args: expression: The function expression as a string. start: The first x value to plot. end: The final x value to plot. step: The number of x samples to render.

Returns: On success: {"result": "Plot generated successfully.", "format": "png", ...} On error: {"error": }

Notes: - Use 'x' as the variable (e.g., x2, not x^2) - Multiplication must be explicitly indicated with * (e.g., 2*x, not 2x) - Powers can be represented with ** or ^ (e.g., x2 or x^2)

summationA

Calculates the summation of a function from start to end.

Args: expression: The expression of function x as a string. start: The starting value of the summation. end: The ending value of the summation.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> summation("x**2", 0, 10) {'result': 385}

expandB

Expands an expression.

Args: expression: The expression to expand as a string.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> expand("(x + 1)2") {'result': 'x2 + 2*x + 1'}

factorizeA

Factorizes an expression.

Args: expression: The expression to factorize as a string.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> factorize("x**2 + 2*x + 1") {'result': '(x + 1)**2'}

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 23 tools

Disambiguation4/5

Each tool targets a distinct mathematical operation (e.g., mean/median/mode, differentiate/integrate, matrix vs vector ops) and names make the difference clear. A few tools all consume symbolic expressions (calculate, expand, factorize, summation, plot_function), which could occasionally cause hesitation, but their outputs and semantics are still distinguishable.

Naming Consistency4/5

All names use lowercase snake_case consistently, which is good. However the convention is not uniformly verb_noun: some are bare operation names (mode, median, calculate, expand) while others are category_operation (matrix_addition, vector_dot_product, correlation_coefficient), so the pattern varies although it stays readable.

Tool Count3/5

23 tools is on the heavy side for a calculator. Each tool covers a genuinely distinct operation and earns its place, but the surface is large enough that some grouping (e.g., a generic matrix tool) or sub-domain organization would improve usability.

Completeness4/5

Coverage is broad across statistics, calculus, symbolic algebra, matrices, vectors, and plotting, with no obvious dead ends for common workflows. Minor gaps exist such as matrix inverse/scalar ops, definite integrals, limits, and systems of equations, but these are workaround-able.

Maintenance

ActivityInactive
ResponsivenessNo issues