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. Price: $0.001 USDC per successful call (x402, 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.8/5.0
Behavior4/5

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

Annotations already mark this read-only, idempotent, open-world and non-destructive, but the description adds genuinely new behavioral context: a $0.001 USDC charge per successful call via x402 on Solana, plus an equivalent HTTPS endpoint. What it does not disclose is the cost of computing large n (up to 10^12) or whether the result is a single integer, which is the remaining behavioral gap.

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 core definition and its examples come first, followed by the numeric domain, and the endpoint/pricing line is short and clearly separated. The one waste is restating the range that the schema already enforces.

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 integer parameter, no output schema and rich read-only annotations, the description supplies the definition, worked examples and domain needed to call it correctly. Only the ambiguity versus two_squares_pair and any note on computational cost for very large n keep it short of complete.

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 parameter meaning; it does by placing n as the right-hand side of x^2 + y^2 = n and illustrating it with sample values. The stated range (0 to 1000000000000) merely repeats the schema's min/max, so it adds no new information beyond defining n's role.

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?

States a precise operation ('How many integer pairs (x, y), counting order and signs, satisfy x^2 + y^2 = n') and grounds it with concrete example outputs (1 for 0, 4 for 1, 8 for 5), so an agent knows exactly what is computed. It never mentions the closest sibling, two_squares_pair, so the agent cannot tell from this text whether it returns a count or the pairs themselves.

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 implied by the mathematical statement of the problem, but the description gives no explicit when-to-use or when-not-to-use guidance and does not point to two_squares_pair, three_squares, or four_squares for related queries. The pricing and HTTPS endpoint lines are operational details, not selection guidance.

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