Skip to main content
Glama

ScorpTech x402 Tools

Egcd

egcd
Read-onlyIdempotent

Extended gcd of a and b. Returns g, x, and y with g = ax + by and g >= 0. gcd(0, 0) is rejected. Decimals have no leading zeros. Returns JSON with: g, x, y. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/egcd

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "egcd"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world, so the safety profile is covered. The description goes meaningfully beyond that by disclosing cost ($0.001 USDC on Base or Solana via x402), an error case, the canonical sign of g, the output field list, and an alternate HTTPS endpoint — though it omits behavior on very large inputs and whether failures are charged.

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?

Short, front-loaded, and each sentence carries facts: semantics, sign convention, edge case, output shape, payment, endpoint. The phrase 'Decimals have no leading zeros' is awkwardly worded and slightly ambiguous, the only real friction.

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

Completeness5/5

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 no output schema, the definition covers return values (g, x, y), the defining equation, the sign guarantee, the rejected input, input formatting, and the commercial/auth model. An agent has everything needed to call it and to expect a charged request.

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 coverage is 0% for the two parameters, so the description must compensate. It confirms the two operands are a and b and adds a format rule ('Decimals have no leading zeros'), but does not mention that inputs are digit strings up to 200 characters, which is the key usability constraint captured only in the pattern.

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?

Names a specific mathematical operation ('Extended gcd of a and b') and immediately defines its semantics with the Bezout identity g = a*x + b*y and the sign constraint g >= 0. This is unambiguous and clearly distinguishes it from a plain gcd sibling, which would not return x and y.

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?

Provides an ineligibility condition ('gcd(0, 0) is rejected') but never states when to choose this tool over a plain gcd or modular-inverse style sibling, nor any prerequisites beyond payment. Usage is implied by the math rather than spelled out.

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