Skip to main content
Glama

ScorpTech x402 Tools

Gcd Sum

gcd_sum
Read-onlyIdempotent

The sum of gcd(x, y) over 1 <= x,y <= n. Through 1 it is 1, through 5 it is 37, and through 10 it is 189. n runs from 1 to 5000. Returns JSON with: n, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/gcd-sum

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": {
      "n": "<n>"
    },
    "name": "gcd_sum"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/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 adds genuinely new behavior: the JSON return shape (n, value), a per-call price of $0.001 USDC via x402 on Base or Solana, and an equivalent HTTPS endpoint. It does not say what happens on out-of-range input, but that is a minor gap given the declared bounds.

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?

Front-loaded with the defining formula, then examples, then constraints, return shape and pricing, so the most important information comes first. The example clause is slightly compressed into one run-on sentence, but nothing is padding.

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 single-parameter computational tool with no output schema, the definition covers the domain, sample values, return fields, cost and an alternate transport. Only the exact representation of 'value' (type or range of the integer) is left unstated, which is a small residual gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single parameter has no description in the schema, so the description carries the load: it defines n as running from 1 to 5000 and illustrates the mapping with three concrete input/output pairs. That is more than the raw minimum/maximum provides, though it does not explain output magnitude or formatting for large n.

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 states the exact mathematical object: the sum of gcd(x, y) over 1 <= x,y <= n, with sample values for n=1, 5 and 10. An agent can distinguish this from the neighbouring gcd-family tools (domb_gcd, duffinian_gcd, franel_gcd) purely from the formula, without opening a schema.

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?

It gives the valid domain (n from 1 to 5000) and worked examples that let an agent sanity-check results, but it never says when to choose this over the sibling sum/gcd tools or what it is useful for. Usage is implied by the domain rather than stated.

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