Skip to main content
Glama

UK Data: Maths and statistics

greatest_common_divisor

Read-onlyIdempotent

Computes the greatest common divisor (GCD) of two non-negative integers using the Euclidean algorithm. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
aNointeger, required, the first non-negative integer
bNointeger, required, the second non-negative integer

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description still adds value by disclosing the algorithm (Euclidean) and the cost of 1 credit, though it never says what the call returns or how degenerate inputs like 0,0 are handled.

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?

Two compact sentences, front-loaded with the verb and resource, with the cost parenthetical appended so it does not obstruct the definition. No redundant or filler wording.

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

Completeness4/5

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

For a two-parameter, side-effect-free computation with full schema coverage and rich annotations, the description supplies everything needed to select and invoke it correctly. Only the return value (a single integer, and the gcd(0,0) convention) is left unspecified, which is a minor gap.

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 100%, so both parameters (a, b) are already documented as required non-negative integers. The description restates the domain (non-negative) but adds no syntax, range, or format detail beyond the schema — the baseline 3 is appropriate.

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?

States a specific verb (computes) and resource (greatest common divisor of two non-negative integers), plus the algorithm used. The scope is unambiguous and clearly distinct from siblings such as least_common_multiple or is_prime.

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?

Usage is only implied by the mathematical definition — an agent can infer this is the tool for GCD, but there is no explicit when-to-use rule, no naming of the nearest alternative (least_common_multiple), and no note on prerequisites or edge cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources