Skip to main content
Glama
tanishra

Mathematics MCP Server

by tanishra

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": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{
  "tasks": {
    "list": {},
    "cancel": {},
    "requests": {
      "tools": {
        "call": {}
      },
      "prompts": {
        "get": {}
      },
      "resources": {
        "read": {}
      }
    }
  }
}

Tools

Functions exposed to the LLM to take actions

NameDescription
addA

Perform addition of two numbers provided in the data object. Args: data (TwoNumberOperation): An object containing two numbers a and b to be added. Returns: Dict[str, Any]: A dictionary containing the operation name ("add") and the result of the addition if successful, or an error message if an exception occurs. Logs: Logs the operation and result in the format: "ADD | {data.a} + {data.b} = {result}"

subtractB

Perform subtraction of two numbers provided in the data object. Args: data (TwoNumberOperation): An object containing two numbers, a and b. Returns: Dict[str, Any]: A dictionary containing the operation name ("subtract") and the result of the subtraction if successful, or an error message if an exception occurs. Logs: Logs the subtraction operation and its result in the format: "SUB | {data.a} - {data.b} = {result}".

multiplyA

Perform multiplication of two numbers provided in the data object. Args: data (TwoNumberOperation): An object containing two numbers a and b to be multiplied. Returns: Dict[str, Any]: A dictionary containing the result of the multiplication operation or an error message in case of failure. Logs: Logs the multiplication operation in the format: "MUL | {data.a} * {data.b} = {result}" Exceptions: Catches any exceptions that occur during the operation and returns an error response with the exception message.

divideA

Perform division of two numbers provided in the TwoNumberOperation object. Args: data (TwoNumberOperation): An object containing two numbers, a and b, where a is the numerator and b is the denominator. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ZeroDivisionError: If the denominator (b) is zero. Notes: - Logs the division operation and its result. - Returns a success response if the operation is successful. - Returns an error response if an exception occurs.

modulusA

Calculate the modulus (remainder) of two numbers provided in the data object. Args: data (TwoNumberOperation): An object containing two numbers, a and b. Returns: Dict[str, Any]: A dictionary containing the operation result if successful, or an error message if an exception occurs. Raises: ZeroDivisionError: If the second number (b) is zero, as modulus by zero is not allowed. Logs: Logs the operation and result in the format "MOD | a % b = result" if successful. Example: data = TwoNumberOperation(a=10, b=3) result = modulus(data) # result -> {"status": "success", "operation": "modulus", "result": 1}

powerA

Calculate the power of a given base raised to a given exponent. Args: data (PowerOperation): An object containing the base and exponent values. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Logs: Logs the operation in the format "POW | base ^ exponent = result". Exceptions: Catches any exceptions during the calculation and returns an error response.

squareA

Calculate the square of a given number. Args: data (SingleNumberOperation): An object containing the number to be squared. Returns: Dict[str, Any]: A dictionary containing the operation name ("square") and the result of squaring the input number. In case of an error, returns an error response. Logs: Logs the operation and the result in the format "SQUARE | ^2 = ". Raises: Exception: If an error occurs during the calculation.

sqrtA

Calculate the square root of a given number. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation name, result, and status of the operation. Raises: ValueError: If the input number a is negative. Notes: - Logs the operation and result using the logger. - Returns a success response if the operation is successful. - Returns an error response if an exception occurs.

factorialA

Calculate the factorial of a given number. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If the input is negative or not an integer. Notes: - Only works with non-negative integers. - Logs the operation and result.

absoluteA

Calculate the absolute value of a given number. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Returns the absolute (non-negative) value of the input. - Logs the operation and result.

logarithmA

Calculate the logarithm of a value with a specified base. Args: data (LogOperation): An object containing the value and base for logarithm. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If value is non-positive or base is invalid. Notes: - Default base is 10 (common logarithm). - Use base 'e' (2.718...) for natural logarithm. - Logs the operation and result.

natural_logA

Calculate the natural logarithm (base e) of a given number. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If the input is non-positive. Notes: - Natural log uses base e (approximately 2.718). - Logs the operation and result.

sineA

Calculate the sine of an angle in degrees. Args: data (AngleOperation): An object containing the angle in degrees. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Input angle should be in degrees (not radians). - Result is between -1 and 1. - Logs the operation and result.

cosineA

Calculate the cosine of an angle in degrees. Args: data (AngleOperation): An object containing the angle in degrees. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Input angle should be in degrees (not radians). - Result is between -1 and 1. - Logs the operation and result.

tangentA

Calculate the tangent of an angle in degrees. Args: data (AngleOperation): An object containing the angle in degrees. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Input angle should be in degrees (not radians). - Undefined at 90°, 270°, etc. (will return very large values). - Logs the operation and result.

gcdA

Calculate the Greatest Common Divisor (GCD) of two numbers. Args: data (TwoNumberOperation): An object containing two numbers, a and b. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If inputs are not integers. Notes: - Both numbers must be integers. - Returns the largest number that divides both inputs. - Logs the operation and result.

lcmA

Calculate the Least Common Multiple (LCM) of two numbers. Args: data (TwoNumberOperation): An object containing two numbers, a and b. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If inputs are not integers. Notes: - Both numbers must be integers. - Returns the smallest number that is divisible by both inputs. - Logs the operation and result.

meanA

Calculate the mean (average) of a list of numbers. Args: data (ListOperation): An object containing a list of numbers. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If the list is empty. Notes: - Mean is the sum of all numbers divided by count. - Logs the operation and result.

medianA

Calculate the median of a list of numbers. Args: data (ListOperation): An object containing a list of numbers. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If the list is empty. Notes: - Median is the middle value when numbers are sorted. - For even-length lists, returns average of two middle values. - Logs the operation and result.

standard_deviationA

Calculate the standard deviation of a list of numbers. Args: data (ListOperation): An object containing a list of numbers. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Raises: ValueError: If the list has fewer than 2 numbers. Notes: - Measures the amount of variation in the dataset. - Uses sample standard deviation (n-1 denominator). - Logs the operation and result.

ceilingA

Round a number up to the nearest integer. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Always rounds up (e.g., 3.1 -> 4, -3.1 -> -3). - Logs the operation and result.

floorA

Round a number down to the nearest integer. Args: data (SingleNumberOperation): An object containing the input number a. Returns: Dict[str, Any]: A dictionary containing the operation result or an error message. Notes: - Always rounds down (e.g., 3.9 -> 3, -3.1 -> -4). - Logs the operation and result.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

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