Skip to main content
Glama
codewithmsunke

MCP Math Server

MCP Math Server

A Model Context Protocol (MCP) server built with TypeScript and Node.js, designed to provide basic math operations and a greeting resource for AI assistants and tool integrations.

Features

  • Addition, Subtraction, Multiplication, Division (with division-by-zero error handling)

  • Square and Square Root (with error handling for negative input, and results rounded to two decimals)

  • Greatest Common Measure (GCM) and Least Common Multiple (LCM)

  • Number Comparison tools (less than, greater than, less than or equal, greater than or equal, general comparison)

  • Greeting resource (returns a personalized greeting)

  • Fully type-safe using Zod schemas

  • Easily extensible for more tools/resources

Related MCP server: Calculator MCP Server

Installation

  1. Clone the repository or copy the project files.

  2. Install dependencies:

    npm install
  3. Compile the TypeScript code:

    npx tsc

Running the Server

This project is designed to run as an MCP server using VS Code's MCP integration.

  1. Ensure your .vscode/mcp.json is configured as follows:

    {
      "servers": {
        "my-mcp-server-d95b22f0": {
          "type": "stdio",
          "command": "node",
          "args": ["d:/Proj/3/mcp-demo/dist/index.js"]
        }
      },
      "inputs": []
    }
  2. Start VS Code and ensure the MCP extension is enabled. The server will start automatically.

Available Tools

  • add: Add two numbers

    • Input: { a: number, b: number }

    • Output: The sum of a and b is result

  • subtract: Subtract b from a

    • Input: { a: number, b: number }

    • Output: The difference of a and b is result

  • multiply: Multiply two numbers

    • Input: { a: number, b: number }

    • Output: The product of a and b is result

  • divide: Divide a by b

    • Input: { a: number, b: number }

    • Output: The quotient of a divided by b is result (error if b = 0)

  • square: Square a number

    • Input: { a: number }

    • Output: The square of a is result

  • sqrt: Square root of a number

    • Input: { x: number }

    • Output: The square root of x is result (rounded to two decimals, error if x < 0)

  • gcm: Greatest Common Measure of two numbers

    • Input: { a: number, b: number }

    • Output: The greatest common measure of a and b is result

  • lcm: Least Common Multiple of two numbers

    • Input: { a: number, b: number }

    • Output: The LCM of a and b is result

  • lessThan: Compare if a is less than b

    • Input: { a: number, b: number }

    • Output: a is less than b or a is not less than b

  • greaterThan: Compare if a is greater than b

    • Input: { a: number, b: number }

    • Output: a is greater than b or a is not greater than b

  • lessThanOrEqual: Compare if a is less than or equal to b

    • Input: { a: number, b: number }

    • Output: a is less than or equal to b or a is not less than or equal to b

  • greaterThanOrEqual: Compare if a is greater than or equal to b

    • Input: { a: number, b: number }

    • Output: a is greater than or equal to b or a is not greater than or equal to b

  • compare: General comparison tool

    • Input: { a: number, b: number }

    • Output: Comparison result: -1, 0, or 1 with description

Greeting Resource

  • greet: Returns a greeting for a given name

    • Resource URI: greet://{name}

    • Output: Hello, {name}!

Example Usage

  • Add: { a: 2, b: 3 }The sum of 2 and 3 is 5

  • Subtract: { a: 10, b: 5 }The difference of 10 and 5 is 5

  • Multiply: { a: 4, b: 6 }The product of 4 and 6 is 24

  • Divide: { a: 8, b: 2 }The quotient of 8 divided by 2 is 4

  • Square: { a: 7 }The square of 7 is 49

  • Square Root: { x: 5 }The square root of 5 is 2.24

  • GCM: { a: 12, b: 18 }The greatest common measure of 12 and 18 is 6

  • LCM: { a: 2, b: 5 }The LCM of 2 and 5 is 10

  • Less Than: { a: 3, b: 5 }3 is less than 5

  • Greater Than: { a: 7, b: 4 }7 is greater than 4

  • Less Than or Equal: { a: 5, b: 5 }5 is less than or equal to 5

  • Greater Than or Equal: { a: 8, b: 3 }8 is greater than or equal to 3

  • Compare: { a: 2.5, b: 3.7 }Comparison result: -1 (2.5 is less than 3.7)

  • Greeting: greet://AliceHello, Alice!

Extending the Project

You can easily add more tools or resources by registering them in src/index.ts using the MCP SDK and Zod schemas.

License

MIT

Available Tools

8 tools
addAddition toolA

Add two numbers a + b

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the operation ('Add') but doesn't disclose behavioral traits like error handling for non-numeric inputs, overflow, or return format. For a tool with zero annotation coverage, this is a significant gap.

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, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple arithmetic tool, earning its place clearly.

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 low complexity (simple addition) and no output schema, the description is minimally complete but lacks details on return values or error cases. It's adequate for basic use but could be improved with more context.

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?

The description adds meaning beyond the input schema by specifying that parameters 'a' and 'b' are numbers to be added. With 0% schema description coverage, this compensates well, though it doesn't detail constraints like integer vs. float or range limits.

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 'Add two numbers a + b' clearly states the specific verb ('Add') and resource ('two numbers'), and distinguishes it from sibling tools like subtract, multiply, and divide. It's precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like subtract, multiply, or divide. It states what the tool does but not when it's appropriate, leaving the agent to infer usage from the name alone.

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

divideDivision toolC

Divide a by b (a / b)

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the operation 'a / b' but doesn't disclose behavioral traits such as error handling (e.g., division by zero), output format, or performance characteristics. This leaves significant gaps for an AI agent.

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 extremely concise with a single sentence that directly states the tool's function. It is front-loaded with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a division operation with no annotations and no output schema, the description is incomplete. It lacks details on error cases (e.g., division by zero), return values, or usage context, which are crucial for proper tool invocation.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning by specifying that 'a' is divided by 'b', which clarifies the order of parameters beyond the schema's type definitions. However, it doesn't explain parameter roles (e.g., dividend and divisor) or constraints like numeric ranges.

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 the verb 'divide' and the resources 'a' and 'b', making the purpose explicit. It distinguishes from siblings like 'add' or 'multiply' by specifying division. However, it doesn't explicitly mention it's a mathematical operation, though this is implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'multiply' or 'subtract'. It states what the tool does but offers no context about appropriate use cases, prerequisites, or exclusions.

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

gcmGCM toolA

Calculate the greatest common measure (GCD) of two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'calculate' implies a read-only operation, the description doesn't specify error handling (e.g., for non-integer inputs), performance characteristics, or output format. It lacks details on what happens with negative numbers, zeros, or large values.

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, efficient sentence with zero wasted words. It's front-loaded with the core purpose and uses precise terminology ('greatest common measure (GCD)'). Every word earns its place by defining the operation and its inputs.

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?

For a simple mathematical tool with 2 parameters, no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and parameters but lacks behavioral details (e.g., output format, error cases) and usage guidelines relative to siblings. The absence of annotations increases the need for more completeness.

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?

The description explicitly states that the tool calculates GCD for 'two numbers,' which directly maps to parameters a and b. With 0% schema description coverage (schema only specifies types as 'number'), this adds crucial semantic meaning beyond the bare schema. However, it doesn't clarify if these are integers, natural numbers, or any numerical type.

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 specific verb ('calculate') and resource ('greatest common measure (GCD) of two numbers'), distinguishing it from sibling tools like add, subtract, multiply, divide, lcm, sqrt, and square. It precisely defines the mathematical operation being performed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like lcm (least common multiple) or other mathematical operations, nor does it specify use cases or prerequisites for calculating GCD.

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

lcmLCM toolA

Calculate the least common multiple of two numbers

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the calculation action but does not describe traits like error handling (e.g., for non-integer inputs), performance characteristics, or output format. This is a significant gap for a tool with zero annotation coverage.

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, efficient sentence with zero waste—it directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 low complexity (basic arithmetic operation) and lack of annotations or output schema, the description is minimally adequate. It covers the core purpose but lacks details on behavior, usage guidelines, and output, which could hinder an agent's ability to use it effectively in varied contexts.

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?

The description adds meaningful context beyond the input schema by specifying that the parameters are 'two numbers' for calculating the LCM, which clarifies the purpose of 'a' and 'b'. With 0% schema description coverage and 2 parameters, this compensates well, though it doesn't detail constraints like integer-only inputs.

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 specific verb 'calculate' and the resource 'least common multiple of two numbers', which precisely distinguishes it from sibling tools like 'add', 'divide', 'gcm', etc. It directly communicates the mathematical operation without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'gcm' (likely greatest common divisor) or other arithmetic operations. It lacks context about use cases, prerequisites, or comparisons with sibling tools, leaving the agent to infer usage scenarios.

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

multiplyMultiplication toolC

Multiply two numbers a * b

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic operation without mentioning traits like error handling (e.g., for non-numeric inputs), performance, or side effects. This leaves significant gaps for an AI agent to understand how the tool behaves beyond the core function.

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, efficient sentence with zero waste. It's front-loaded with the core purpose and uses clear, direct language, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (basic arithmetic) and lack of annotations or output schema, the description is incomplete. It doesn't cover return values, error cases, or behavioral nuances, which are minimal but still relevant for reliable tool invocation by an AI agent.

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 coverage is 0%, but the description adds minimal semantics by naming the parameters 'a' and 'b' as 'two numbers'. However, it doesn't explain their roles (e.g., multiplicands), constraints, or examples. This provides some value over the bare schema but doesn't fully compensate for the low coverage.

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 'Multiply two numbers a * b' clearly states the verb (multiply) and resource (two numbers), making the purpose immediately understandable. It distinguishes from siblings like 'add' or 'subtract' by specifying multiplication, though it doesn't explicitly contrast with all siblings (e.g., 'square' is also a multiplication operation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention use cases, prerequisites, or comparisons to siblings like 'square' (which multiplies a number by itself) or 'gcm/lcm' (which involve multiplication in different contexts).

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

sqrtSquare Root toolA

Calculate the square root of a number (rounded to two decimals)

ParametersJSON Schema
NameRequiredDescriptionDefault
xYes

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions rounding behavior ('rounded to two decimals'), which is valuable, but lacks details on error handling (e.g., for negative numbers), performance, or output format. This leaves gaps for a mutation-like tool (calculation) with no annotation coverage.

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, efficient sentence that front-loads the core purpose ('Calculate the square root of a number') and adds precision details without waste. Every word earns its place, making it highly concise and well-structured.

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 low complexity (single parameter, mathematical operation) and lack of annotations or output schema, the description is minimally adequate. It covers the basic purpose and rounding behavior but misses error handling and output details, which could be important for an agent invoking this tool.

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?

The input schema has 0% description coverage, with one parameter 'x' of type 'number' but no semantic explanation. The description compensates by clarifying that 'x' is 'a number' for which the square root is calculated, adding meaningful context beyond the bare schema. Since there is only one parameter, this is sufficient for a high baseline.

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 specific action ('calculate the square root') and resource ('a number'), with additional precision details ('rounded to two decimals'). It effectively distinguishes this tool from sibling mathematical operations like 'square' or 'multiply' by specifying the square root function.

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 implies usage for square root calculations, but does not explicitly state when to use this tool versus alternatives like 'square' (which squares a number) or other mathematical operations. No guidance is provided on edge cases (e.g., negative inputs) or prerequisites.

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

squareSquare toolC

Calculate the square of a number

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool calculates a square, which implies a read-only, non-destructive operation, but doesn't cover potential errors (e.g., for non-numeric inputs), performance aspects, or output format. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 extremely concise and front-loaded, consisting of a single, clear sentence that directly states the tool's function without any wasted words. Every part of the sentence earns its place by conveying essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity, no annotations, no output schema, and minimal parameter documentation, the description is incomplete. It explains what the tool does but lacks details on usage context, parameter meaning, behavioral traits, or output, making it insufficient for an agent to fully understand how to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, with one parameter 'a' of type 'number' but no explanation in the schema. The description doesn't add any meaning beyond the tool's purpose; it doesn't clarify what 'a' represents (e.g., the input number) or any constraints (e.g., valid ranges). This fails to compensate for the low schema coverage.

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 the tool's purpose with a specific verb ('calculate') and resource ('square of a number'), making it easy to understand what it does. However, it doesn't explicitly distinguish this from sibling tools like 'multiply' or 'sqrt', which could perform similar mathematical operations, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'multiply' (which could compute squares by multiplying a number by itself) and 'sqrt' (which computes square roots), there's no indication of when 'square' is preferred, leaving the agent to guess based on context.

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

subtractSubtraction toolB

Subtract b from a (a - b)

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

TDQS

B3/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states the mathematical operation without mentioning error handling (e.g., what happens with non-numeric inputs), performance characteristics, or any side effects. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 extremely concise with zero wasted words - just 6 words that directly state the operation. It's perfectly front-loaded with the essential information. Every word earns its place in this minimal but complete operational statement.

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?

For a simple mathematical tool with 2 parameters, no annotations, and no output schema, the description provides the core operation but lacks context about error conditions, return values, or mathematical constraints. It's minimally adequate for basic use but doesn't prepare the agent for edge cases or provide complete operational context.

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?

The description clearly explains the parameter relationship 'Subtract b from a (a - b)', which adds crucial semantic meaning beyond the schema's basic type declarations. With 0% schema description coverage and 2 parameters, this compensates well by clarifying the order and operation of parameters, though it doesn't specify numeric constraints or special cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific mathematical operation 'Subtract b from a (a - b)', which clearly indicates what the tool does. However, it doesn't distinguish this from sibling tools like 'add' or 'divide' beyond the basic operation name. The description is functional but lacks differentiation from alternatives in the same mathematical toolkit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'add', 'divide', or 'multiply'. There's no mention of appropriate mathematical contexts, error conditions, or comparisons to sibling tools. The user must infer usage solely from the operation name without any contextual help.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv1.0.0
    • First observedadd
    • First observeddivide
    • First observedgcm
    • First observedlcm
    • First observedmultiply
    • First observedsqrt
    • First observedsquare
    • First observedsubtract

TDQS

B3.4/5.0
Disambiguation5/5

Every tool has a clearly distinct mathematical operation with no overlap in purpose. The descriptions specify unique functions like addition, division, GCD, LCM, multiplication, square root, squaring, and subtraction, making misselection highly unlikely.

Naming Consistency4/5

The naming is mostly consistent with a simple verb-based pattern (e.g., add, divide, multiply, subtract), but there are minor deviations: 'gcm' and 'lcm' use acronyms instead of full names, and 'sqrt' is an abbreviation, which slightly breaks the pattern while remaining readable.

Tool Count5/5

With 8 tools, the server is well-scoped for a basic math utility, covering essential arithmetic and number theory operations. Each tool earns its place without redundancy, and the count is neither too sparse nor overwhelming for the domain.

Completeness4/5

The tool set covers core arithmetic operations (add, subtract, multiply, divide) and key number theory functions (GCD, LCM, square, square root), with minor gaps such as lacking advanced operations like exponentiation or trigonometric functions, but agents can work around this for basic math tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides basic mathematical calculation functionality through MCP tools including arithmetic operations, exponentiation, and square root calculations. Features proper error handling for edge cases like division by zero and negative square roots.
    6
    53
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides mathematical operation tools including basic arithmetic (add, subtract, multiply, divide), power and square root calculations, and safe evaluation of mathematical expressions.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides basic and advanced mathematical operations including addition, subtraction, multiplication, division, power, square root, and factorial calculations through an SSE-based MCP interface.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides mathematical calculation tools including basic operations, expressions, and functions, along with TypeScript SDK documentation resources and meeting summary prompt templates.
    -

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/codewithmsunke/MCPMathTools'

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