Skip to main content
Glama

gcd

Calculate the greatest common divisor of two integers to simplify fractions or solve divisibility problems.

Instructions

Calculate the greatest common divisor of two integers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/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 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.

Purpose5/5

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.

Usage Guidelines2/5

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.