Skip to main content
Glama

ScorpTech x402 Tools

Two Squares Pair

two_squares_pair
Read-onlyIdempotent

Nonnegative integers x and y with x <= y and x^2 + y^2 = n, choosing the greatest y. 5 is 1 and 2. 25 is 0 and 5. A number that is not a sum of two squares is rejected. n runs from 0 to 1000000000000. Returns JSON with: n, 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/two-squares-pair

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": "two_squares_pair"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, openWorld), the description discloses the rejection behavior for non-representable inputs, the return payload (n, x, y), the cost of $0.001 USDC per successful call via x402 on Base or Solana, and a parallel HTTPS endpoint. Pricing and failure semantics are genuinely useful context not available in structured fields; what is missing is any statement of latency or what a rejected call returns.

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?

Content is front-loaded: the mathematical definition first, then concrete examples, then failure behavior, then output shape and commercial/logistics details. It is dense but nearly every sentence earns its place; the n-range sentence largely duplicates the schema's minimum/maximum and is the one recyclable line.

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?

With one parameter, no output schema, and light annotations, the description covers everything an agent needs: exact semantics and tie-breaking, worked examples, input domain, rejection behavior, return fields, and payment/auth model. Nothing material for correct invocation is absent.

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% - the single parameter n carries no description - so the description must compensate, and it does: n is a nonnegative integer that must be a sum of two squares, bounded 0 to 1000000000000. The range is repeated from the schema, but the semantic precondition (representability) is added meaning the schema does not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the exact computation: nonnegative x <= y with x^2 + y^2 = n, picking the greatest y, and reinforces it with worked examples (5 -> 1,2; 25 -> 0,5). That tie-breaking rule is what distinguishes it from a plain 'two_squares' enumeration, but no sibling is named, so the differentiation is implicit rather than explicit.

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 when-to-use or when-not-to-use guidance and no routing to alternatives such as two_squares for all representations. The only conditional information is about failure ('A number that is not a sum of two squares is rejected'), which tells the agent about errors, not about tool selection.

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