math-mcp-lab
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@math-mcp-labCalculate 15 + 27 and multiply the result by 2"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Math Lab: MCP + OpenAI Agents SDK
This project uses the same math logic from two adapters:
An MCP server for Codex, the MCP Inspector, or any compatible client.
An agent built with the OpenAI Agents SDK for natural language conversation.
Packaged as an installable Python package (pip install -e .), with src/ layout and clean layered architecture.
Structure
pyproject.toml # Metadata, dependencias y entry points del paquete
src/
└── math_assistant/
├── domain/ # Reglas matemáticas puras (sin dependencias externas)
├── application/ # Catálogo de capacidades públicas
├── infrastructure/ # Adaptadores para MCP (FastMCP) y OpenAI Agents SDK
└── presentation/ # Interfaz de terminal
tests/
├── unit/ # Prueban dominio y catálogo
└── integration/ # Comprueban que los adaptadores se construyen
run_cli.py # Entry point: interfaz amigable para aprender y probar
run_mcp.py # Entry point: STDIO exclusivo para el cliente MCPThe dependency always points inward:
CLI / MCP / OpenAI SDK → application → domainThe domain does not know FastMCP, OpenAI, an API key, or print. That's why it can be tested quickly and without a network.
Related MCP server: Explore MCP
Installation
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"Copy your OPENAI_API_KEY into a .env file at the root (it is never committed to git).
Run the friendly interface
.\.venv\Scripts\python.exe .\run_cli.pyThe menu allows:
Talk to the OpenAI agent (uses
OPENAI_API_KEYfrom.env).Test addition, subtraction, multiplication, and division locally, without API cost.
See the tools that the MCP server publishes.
Run the MCP server
.\.venv\Scripts\python.exe .\run_mcp.pyTo inspect it with MCP Inspector:
npx @modelcontextprotocol/inspector "C:\ruta\completa\a\math-mcp-lab\.venv\Scripts\python.exe" "C:\ruta\completa\a\math-mcp-lab\run_mcp.py"Use absolute paths: the Inspector does not always respect the current working directory.
Do not add print() inside run_mcp.py or the MCP adapter: the standard output channel (stdout) is reserved for the protocol's JSON-RPC messages. The friendly interface lives in run_cli.py for that reason.
Integration with Codex
.codex/config.toml (not versioned, it's local machine config) points Codex to the MCP server. If you use Codex CLI, create your own:
[mcp_servers.math]
command = "C:\\ruta\\completa\\a\\math-mcp-lab\\.venv\\Scripts\\python.exe"
args = ["C:\\ruta\\completa\\a\\math-mcp-lab\\run_mcp.py"]
cwd = "C:\\ruta\\completa\\a\\math-mcp-lab"Tests
.\.venv\Scripts\python.exe -m unittest discover -s tests -vHow to add a math tool
Create the pure function and its docstring in
src/math_assistant/domain/operations.py.Add it to
MATH_OPERATIONSinsrc/math_assistant/application/tool_catalog.py.Run the tests.
Both adapters will expose it automatically: FastMCP turns it into an MCP tool and the Agents SDK into a function tool.
Available Tools
18 toolsaddA
Add two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure, but 'Add two numbers' fully specifies the core behavior for a pure, side-effect-free arithmetic operation. It does not describe edge cases or return format, but those are simple and partially covered by the presence of an output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four words with zero filler; the core action and object are front-loaded. Nothing could be trimmed without losing meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter pure arithmetic tool with a required schema and an output schema, the description plus schema covers everything an agent needs to call it correctly. No missing conditions, side effects, or edge-case warnings are needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 identifies a and b as the two numbers being added, which is sufficient semantic grounding for trivial numeric parameters. It could name each parameter individually, but the operation makes their roles self-evident.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Add') and resource ('two numbers'), which clearly distinguishes it from sibling arithmetic operations such as subtract, multiply, and divide. It leaves no ambiguity about what the tool computes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly discuss when to use this tool versus alternatives. However, for a primitive arithmetic operation, the intended use is implied by the operation itself; an agent needing the sum of two numbers would select this tool. There are no prerequisites or exclusions to state.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cosineB
Calculate cosine; angles are degrees by default.
| Name | Required | Description | Default |
|---|---|---|---|
| angle | Yes | ||
| degrees | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral disclosure burden, and it does add one useful behavioral detail: angles are degrees by default. However, it does not explicitly describe what happens when the 'degrees' parameter is false, nor any other behavioral traits such as return value shape, though the output schema partially covers that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise, front-loaded sentence: 'Calculate cosine' leads with the core purpose, and the unit clarification follows immediately. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple pure-math tool with only two parameters and an output schema, the description plus schema is largely sufficient. The only notable gap is that the radians behavior is not explicitly spelled out, but the 'degrees' boolean and its default make it reasonably inferable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 provides the key semantic detail that angles are degrees by default, which clarifies the 'angle' parameter's unit. It does not explicitly explain the 'degrees' boolean beyond the default, but the parameter name and schema default make the intended behavior fairly clear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific operation ('Calculate cosine') on a clear resource, which distinguishes it from sibling trigonometric tools like sine and tangent. It could be slightly stronger by explicitly referencing the input angle, but the meaning is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to use this tool versus alternatives such as sine or tangent. The description only states what the tool does, leaving the agent to infer selection purely from the tool name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
divideB
Divide the first number by the second.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden of behavioral disclosure. It states the core operation but does not mention division-by-zero behavior, error handling, precision, or result type, which are relevant for a division tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence that immediately states the operation and operand order. Every word earns its place, and there is no redundant filler or unnecessary background.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-number arithmetic tool with an output schema, the description covers the essential operation. However, it omits critical context such as what happens when the divisor is zero, which is likely an error case the agent should know when invoking the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only provides numeric parameters a and b with no descriptions. The description adds positional semantics: 'the first number' corresponds to the dividend and 'the second number' to the divisor. This partially compensates for the 0% schema description coverage but does not explain constraints or edge cases.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific operation: divide one number by another. This distinguishes it from sibling tools like add, multiply, or power, and the 'first'/'second' phrasing makes the operand order explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use division versus the alternative arithmetic tools. There are no use cases, exclusions, or comparisons with sibling tools, so the agent must infer appropriate usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
factorialA
Calculate the factorial of a non-negative integer.
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It clearly states the operation and the valid input domain, but it omits edge-case behavior such as 0! = 1, error handling for negative numbers, and behavior for very large integers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. Every word contributes meaning: the operation and the input constraint are both immediately clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, pure mathematical function with an output schema present, the description covers the essential input constraint and operation. It is slightly incomplete in not mentioning the 0! edge case, but this is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides no description for the single 'number' parameter, and the generic parameter name adds little. The description compensates by specifying that the value must be a non-negative integer, which is the key semantic requirement for calling this tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Calculate') with a clear resource ('factorial') and a precise domain constraint ('non-negative integer'). It fully distinguishes this tool from the sibling math operations by naming the exact operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to choose this tool over alternatives, nor any exclusions or edge cases. The intended usage is implied only by the tool's name and the description, not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gcdB
Calculate the greatest common divisor of two integers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden of behavioral disclosure. It only states the core calculation and does not mention behavior for edge cases like negative integers, zero, or the sign convention for the result. This is a gap for a numeric tool that could reasonably be expected to define those cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence with no filler words, making it highly readable and appropriately sized for a simple tool. It is concise rather than under-specified, though the brevity does contribute to missing behavioral details counted elsewhere.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has only two simple parameters, an output schema, and a clear mathematical purpose, so a short description is not unreasonable. However, for a tool with no annotations and no parameter descriptions, the lack of edge-case or usage context leaves the description adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 for the bare integer parameters. It only says 'two integers' and does not explicitly identify a and b as the operands, nor clarify any ordering, constraints, or special values. The description adds minimal meaning beyond the schema's integer type declarations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific mathematical operation ('calculate the greatest common divisor') and the input domain ('two integers'), so an agent can immediately distinguish it from arithmetic siblings like add or other number-theory tools like lcm. The verb 'calculate' plus the resource 'greatest common divisor' makes the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to prefer this tool over related siblings such as lcm, is_prime, or factorial. While the operation is self-explanatory in context, the description does not state any conditions, alternatives, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
is_primeA
Return whether a number is prime.
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden, and it does establish that the tool is a pure predicate returning a yes/no answer. It does not disclose edge-case behavior for 0, 1, negative integers, or very large numbers, which are all accepted by the schema as integers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter pure predicate with an output schema available, the description covers the essential behavior. It is slightly incomplete only in its silence about non-standard inputs like 0, 1, and negative numbers.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description needed to compensate by explaining the parameter's meaning and constraints. It only says 'a number,' which is nearly the same as the parameter name and type, and does not clarify that the input should typically be a positive integer greater than 1 or how edge cases are handled.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Return whether') and a clear resource ('a number is prime'), making the tool's predicate behavior immediately obvious. It is easy to distinguish from the listed arithmetic siblings, since none of them test primality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than explicitly stated: if an agent needs to know whether a number is prime, this is the tool to call. However, the description does not explicitly discuss when not to use it or mention alternatives, though the sibling tools are all clearly different operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lcmA
Calculate the least common multiple of two integers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It indicates a pure calculation with no side effects, but it does not comment on edge cases like zero, negative inputs, or potential overflow. This is acceptable for a simple math tool but not deeply transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no filler. The core action and object are front-loaded, making it immediately scannable for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple pure function with two required integer parameters and an output schema, the description captures the essential operation. Minor gaps such as edge-case behavior are low-impact and the tool complexity does not demand more.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 for undocumented parameters. It only says 'two integers' and does not name a or b or clarify their roles, although the commutative nature of LCM makes this less critical.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Calculate the least common multiple of two integers.' This precisely names the operation and distinguishes it from related arithmetic siblings like gcd, factorial, and divide without needing to open their schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives such as gcd or other arithmetic operations. No exclusions, prerequisites, or comparative context are provided, so the agent must infer usage from the mathematical domain.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
logarithmA
Calculate the logarithm of a positive number using the specified base.
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | ||
| number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose that the input number must be positive, which is useful, but it does not mention base validity constraints (e.g., base > 0 and base ≠ 1), edge cases, or error behavior. This is a meaningful but incomplete disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no filler. It conveys the operation, the primary constraint, and the parameter role efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and has an output schema, so return-value documentation is not required in the description. The main gap is the missing base domain and error semantics, which could lead to invalid calls. Overall, the description is adequate but not fully complete for a no-annotation environment.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must add meaning to the parameters. It does clarify that 'number' is the positive input and that 'base' is the logarithm base, which goes beyond the bare schema types. However, it does not explain valid base values or how defaults behave, so the parameter guidance is still partial.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Calculate') and a specific resource ('logarithm'), and it adds the key constraints 'positive number' and 'specified base'. It clearly distinguishes this tool from the arithmetic sibling tools such as power, square_root, and nth_root.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the use case: call this when a logarithm is needed. However, it provides no explicit guidance about when not to use it or how it compares to related inverse operations like power or nth_root. The usage context is clear but not explicitly framed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
meanA
Calculate the arithmetic mean of a non-empty list.
| Name | Required | Description | Default |
|---|---|---|---|
| numbers | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden; it clearly states that only non-empty inputs are valid and precisely defines the calculation. Since this is a pure mathematical operation with no side effects, no further behavioral disclosure is necessary beyond what the output schema supplies.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the verb, operation, and input constraint are all present and nothing is repeated from the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter pure function with an output schema, this description is nearly complete: it states the operation and the non-empty precondition. It only lacks explicit differentiation from median/standard_deviation and edge-case behavior, which are minor given the low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameter meaning. It adds a non-empty constraint and the arithmetic-mean operation on the list, but it does not elaborate on element constraints beyond the schema's 'number' type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific operation ('Calculate the arithmetic mean') and a specific input ('a non-empty list'), so an agent can tell it apart from siblings like median and standard_deviation without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to choose the mean over median or standard_deviation, and no explicit when-not-to-use clause. The phrase 'arithmetic mean' implies a context, but the description does not state it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
medianB
Calculate the median of a non-empty list.
| Name | Required | Description | Default |
|---|---|---|---|
| numbers | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the burden is on the description to disclose behavior. It adds only the non-empty precondition; it does not mention handling of even-length lists, sorting, or error behavior. The behavior beyond the bare calculation is largely undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with no filler; the core operation and the key precondition are front-loaded. It is as concise as the tool's simplicity allows.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter math tool with an output schema, the description covers the required input and the operation. Some richer context about how median is computed is absent, but the schema and the common mathematical meaning likely prevent mis-calls.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should compensate, but it only adds 'non-empty' to the schema's 'numbers' array. It does not clarify number types, ordering, or valid value ranges beyond what the schema already says.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the exact operation: 'Calculate the median' of a list. This is distinct from siblings like mean, sum, or product, and the phrase 'non-empty list' adds a precondition. No ambiguity about the resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no when-to-use guidance or alternatives. It does not explain that median is preferable to mean for skewed distributions or outlier-prone data, and it never mentions sibling tools. Only a precondition ('non-empty') is stated, which is not usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
multiplyA
Multiply two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the behavioral disclosure burden. It accurately states the core computation, multiplication, which is sufficient for a simple pure function with no side effects or permissions involved. The return value is not described, but an output schema exists to cover that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no filler or repetition. Every word earns its place: 'Multiply two numbers' fully communicates the tool's purpose in a front-loaded manner.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, a two-parameter schema with both params required, and an existing output schema, the description is complete enough for an agent to select and invoke the tool. There are no side effects, prerequisites, or edge-case behaviors that need additional disclosure for a basic arithmetic operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema description coverage is 0%, and the schema only exposes parameter names and types. The description adds minimal semantic value by clarifying that both a and b are the numbers to be multiplied, but it does not provide individual parameter descriptions. Since multiplication is commutative, parameter roles are symmetric, reducing the need for more detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, 'Multiply,' and a clear resource, 'two numbers,' which precisely identifies the operation. Even among many sibling arithmetic tools, the term 'multiply' unambiguously distinguishes it from add, divide, power, and other operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The operation itself implies when to use the tool: whenever a product of two numbers is needed. However, there is no explicit mention of when not to use it or how it compares to sibling tools such as add or power, so the usage guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
nth_rootC
Calculate the nth root of a number.
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | ||
| number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. 'Calculate' implies a pure computation with no side effects, but the description does not disclose edge-case behavior such as handling of negative numbers, zero or negative n, non-integer n, or potential error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence with no filler or repetition. It is not as informative as it could be, but it is concise and front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a minimal but viable definition for a simple math operation: an agent can likely call it correctly for standard inputs. However, it lacks usage context relative to siblings and does not address edge cases, making it incomplete for robust agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The phrase 'nth root of a number' implies that 'number' is the radicand and 'n' is the root index, which adds some meaning. However, it does not clarify constraints like n needing to be a positive integer or number needing to be non-negative for even roots.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Calculate') and clearly identifies the operation and resource: the nth root of a number. It is distinct from siblings like square_root and power by the nature of the operation, though it does not explicitly reference any alternative tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given for when to use this tool versus related siblings such as square_root or power. There are no exclusions, preconditions, or alternative suggestions, so the agent must infer usage solely from the tool name and brief description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
powerA
Raise a number to an exponent.
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| exponent | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It clearly communicates the core operation but does not mention edge cases such as negative bases with fractional exponents, overflow, NaN, or domain restrictions. For a simple pure function, the basic behavior is transparent, but the description is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, no filler, and the core meaning is front-loaded. Every word contributes to understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter mathematical function with an output schema available, the description covers the essential invocation semantics. It would benefit from mention of edge-case behavior or when to prefer this over siblings, but the low complexity makes the absence non-critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must clarify parameter roles. It does so by mapping 'a number' to base and 'an exponent' to exponent, making the relationship between the two parameters clear. It does not add constraints or domain details, but for two clearly named numeric parameters this is adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific operation — 'Raise a number to an exponent' — which unambiguously identifies exponentiation as the tool's function. It distinguishes this tool from siblings like add, multiply, and nth_root by naming the exponent relationship.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus its many mathematical siblings, such as square_root, nth_root, or logarithm. The description implies the obvious use case but provides no contextual direction or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sineA
Calculate sine; angles are degrees by default.
| Name | Required | Description | Default |
|---|---|---|---|
| angle | Yes | ||
| degrees | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It discloses that angles are degrees by default, which is a meaningful behavioral detail beyond the schema. It does not explicitly explain the degrees=false case, but 'by default' reasonably implies radians as the alternative mode.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: one short sentence that front-loads the core operation and includes the most important unit behavior. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity of this tool and the presence of an output schema, the description covers the essential invocation context: what the tool computes and the unit convention. The only minor gap is not explicitly stating the degree/radian toggle, but this is implied by 'degrees by default' and the schema's boolean flag.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 partially does by clarifying that the angle is in degrees by default, which gives meaning to the angle parameter. However, it does not explicitly describe the degrees boolean's semantics beyond the default, leaving the false case to inference.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Calculate sine'. It also clarifies that angles are degrees by default, which adds precision beyond the tool name alone. This clearly distinguishes it from siblings like cosine and tangent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied by 'Calculate sine', but the description does not explicitly state when to choose sine over the sibling trigonometric functions, nor does it mention any exclusions or alternatives. An agent can infer the usage, but no explicit guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
square_rootA
Calculate the square root of a non-negative number.
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 adds the meaningful behavioral constraint that the input must be non-negative, which is important. However, it does not disclose what happens for negative inputs (e.g., error, NaN) or how the result is returned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. The verb and resource are front-loaded, followed by the key constraint.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and an output schema exists, so return values are likely covered there. The description captures the core input constraint. The only gap is explicit behavior for negative inputs, but that is partially implied by 'non-negative'.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides 0% description coverage for the 'number' parameter, so the description must compensate. The phrase 'non-negative number' adds a crucial semantic constraint that is not present in the schema. It doesn't explicitly tie the constraint to the parameter name, but the intent is clear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'calculate' and names the exact resource 'square root', with the key domain constraint 'non-negative number'. This clearly distinguishes it from sibling tools like nth_root and power.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool, but it does not explicitly name alternatives or provide exclusion criteria. An agent would know to use it when a square root is needed, but there is no guidance on choosing it over nth_root or other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
standard_deviationA
Calculate the population standard deviation of a non-empty list.
| Name | Required | Description | Default |
|---|---|---|---|
| numbers | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the non-empty precondition and the population-versus-sample choice, but it does not describe edge-case behavior such as what happens with an empty list, a single-element list, or non-finite numbers. For a simple numeric function this is average transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with the key precondition ('non-empty') included. Every word earns its place, and the information is front-loaded for quick agent parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple single-parameter math tool, an output schema exists to describe the return value, and the description covers the essential metric and precondition. It could mention edge cases like empty or single-element lists, but for this complexity level it is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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, but it only adds the 'non-empty list' constraint. It does not explain what values are valid, whether the list order matters, or how invalid inputs are handled. The schema already declares the parameter as an array of numbers, so the added semantic value is minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Calculate'), a precise statistical quantity ('population standard deviation'), and the target data shape ('non-empty list'). This clearly distinguishes it from sibling tools like mean and median, and even distinguishes population standard deviation from a sample-based alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'population standard deviation' makes the intended use unambiguous, and 'non-empty list' sets the applicability condition. It does not explicitly name alternatives or exclusions, but the sibling list contains no close alternative to this operation, so the context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
subtractB
Subtract the second number from the first.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 states the core operation but does not disclose edge-case behavior such as floating-point precision, handling of NaN/Infinity, whether the result is always a number, or any overflow behavior. Since there is no annotation context at all, a simple operation description leaves agents blind to potential edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single clear sentence with no padding. The order of operands is specified precisely, and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter arithmetic tool with an output schema present, the description is minimally sufficient. The math operation is fully described, and whether the return value is the difference is implied by the output schema. However, without annotations, edge-case behavior (non-finite numbers, precision) is not covered, which lowers completeness slightly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry parameter meaning. The phrase 'second number from the first' maps to a and b, indicating that a is the minuend and b is the subtrahend, which adds some semantic value. However, it does not specify types beyond the schema's number type, nor does it clarify constraints or provide examples of order/edge cases.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Subtract the second number from the first' clearly identifies the operation with a specific verb and resource, and unambiguously distinguishes it from siblings like add, multiply, and divide. Even without context, an agent knows exactly what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: whenever subtraction is needed, and the mathematical domain distinguishes it from sibling arithmetic operations. However, it doesn't explicitly state when not to use it or point to alternatives (e.g., for vector/matrix operations). For a simple arithmetic tool in a math sibling group, the implied usage is adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tangentA
Calculate tangent; angles are degrees by default.
| Name | Required | Description | Default |
|---|---|---|---|
| angle | Yes | ||
| degrees | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose that angles are degrees by default, which is a key behavioral trait, but it does not mention undefined values at 90°/270° or the behavior when degrees=false.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the operation and appends the one essential mode detail. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter math function, the description plus output schema is mostly sufficient. The main gaps are explicit radian-mode handling and mention of undefined tangent inputs, but an agent can still invoke the tool correctly with the default setup.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should compensate for the lack of parameter documentation. It only repeats the degree-default notion and does not explicitly explain that degrees=false switches to radians or clarify the meaning of the required angle parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb-resource pair, 'Calculate tangent', which unambiguously identifies the operation. It is clearly distinguishable from sibling tools like sine and cosine, and the added unit default further clarifies intent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit guidance about when to choose tangent over alternatives like sine or cosine, and no exclusions are stated. The intended usage is implied by the tool name and description, which is adequate but not richly instructional.
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.
18 tool updates
v0.1.0- First observed
add - First observed
cosine - First observed
divide - First observed
factorial - First observed
gcd - First observed
is_prime - First observed
lcm - First observed
logarithm - First observed
mean - First observed
median - First observed
multiply - First observed
nth_root - First observed
power - First observed
sine - First observed
square_root - First observed
standard_deviation - First observed
subtract - First observed
tangent
TDQS
Scored across 18 tools
Each tool maps to a distinct mathematical operation; even closely related functions like square_root and nth_root are clearly separated by their descriptions. There is no meaningful overlap or ambiguity among the eighteen tools.
All tool names are lowercase, multi-word names use consistent snake_case, and each name directly reflects its operation. The naming style is uniform across arithmetic, statistics, and number theory functions.
Eighteen tools is slightly above the ideal 3-15 range, but each function serves a distinct and commonly needed math purpose. The count is not bloated; it simply reflects a broad but focused math utility surface.
The set covers arithmetic, powers/roots, logarithms, basic trigonometry, descriptive statistics, and number theory well. Minor gaps like modulo, absolute value, or inverse trig exist, but agents can handle most common math tasks without dead ends.
Maintenance
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
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseBqualityDmaintenanceA learning-focused MCP server that demonstrates how to build arithmetic tools for AI assistants, currently featuring addition functionality with structured input/output.19MIT
- FlicenseNot gradedqualityDmaintenanceA demonstration MCP server that exposes basic arithmetic tools (add, subtract, ping) through FastAPI and shows how to integrate them with OpenAI's tool-calling API for LLM orchestration.-
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server built with FastMCP that exposes basic calculator operations (add, subtract, multiply, divide) as tools for MCP clients like GitHub Copilot Agent mode.-
- FlicenseAqualityDmaintenanceA basic MCP server built with the FastMCP framework that provides fundamental mathematical operations like addition, subtraction, multiplication, and division. It serves as a demonstration for integrating math-based tools into MCP-compatible environments like Cursor IDE.4-