Skip to main content
Glama
IBM

MCP Math Server

by IBM

extended_gcd

Compute the greatest common divisor and Bézout coefficients for two integers using the extended Euclidean algorithm.

Instructions

Extended Euclidean algorithm. Returns gcd(a,b) and coefficients x,y such that ax + by = gcd(a,b). (Domain: arithmetic, Category: number_theory)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
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 states the algorithm and output format, but lacks behavioral details such as input constraints (e.g., handling of negative integers, zero values), performance characteristics, error conditions, or whether it's a pure computation without side effects. For a mathematical tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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: it states the algorithm name, outputs, and mathematical relationship in one sentence, followed by domain/category tags. Every word contributes directly to understanding the tool's purpose, with zero wasted information.

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 mathematical nature, 2 parameters, no annotations, and no output schema, the description is minimally adequate. It covers the core purpose and output format but lacks details on parameter semantics, behavioral traits, and usage context. For a tool in a server with many mathematical siblings, more guidance on differentiation would improve completeness.

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%, so the description must compensate. It names the parameters (a, b) and implies they are integers for the Euclidean algorithm, but does not specify their meaning beyond being inputs to the algorithm. No details on constraints, default values, or examples are provided. The description adds minimal semantic value beyond the bare schema.

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 explicitly states the tool's purpose: 'Extended Euclidean algorithm. Returns gcd(a,b) and coefficients x,y such that ax + by = gcd(a,b).' It specifies the exact mathematical operation (Extended Euclidean algorithm), the inputs (a, b), and the outputs (gcd and coefficients). It clearly distinguishes from sibling tools like 'gcd' by including the extended algorithm with coefficient computation.

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 through its mathematical definition (computing gcd and Bézout coefficients), but does not explicitly state when to use this tool versus alternatives like 'gcd' or 'bezout_identity'. The domain/category tags ('arithmetic', 'number_theory') provide some context, but no explicit guidance on prerequisites or comparisons with siblings is given.

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

Install Server

Other Tools

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

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