Skip to main content
Glama

ScorpTech x402 Tools

Two Squares

two_squares
Read-onlyIdempotent

How many integer pairs (x, y), counting order and signs, satisfy x^2 + y^2 = n. There is 1 for 0, 4 for 1, and 8 for 5. n runs from 0 to 1000000000000. 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/two-squares

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the remaining burden is light. The description adds genuinely useful operational context the annotations cannot convey: the payment model ($0.001 USDC per successful call via x402 on Base or Solana) and an equivalent HTTPS endpoint.

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 definition is front-loaded with the computation and its examples before moving to the return shape and pricing. Every sentence carries information, though the explicit domain restatement slightly duplicates the schema's min/max.

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?

With one parameter, no output schema, and full annotation coverage, this is close to complete: it states the computation, example outputs, input domain, return keys (n, value), and cost/transport. The only mild gap is that 'value' is described by implication through the examples rather than stated directly as the pair count.

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%, so the description must carry the meaning; it explains that n is the right-hand side of x^2 + y^2 = n and restates the 0 to 1,000,000,000,000 domain enforced by the schema. It adds semantic meaning about n's role in the computation rather than merely repeating the type.

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 names a specific computation — counting integer pairs (x, y) with x^2 + y^2 = n, including order and signs — and anchors it with concrete examples (1 for 0, 4 for 1, 8 for 5). It is clear about the resource without explicitly contrasting itself with near neighbors such as two_squares_pair or four_squares.

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?

The examples imply how to interpret results but there is no statement of when to prefer this tool over two_squares_pair or four_squares, nor any exclusion or prerequisite. An agent must infer the choice from names alone.

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