Skip to main content
Glama

ScorpTech x402 Tools

Three Squares

three_squares
Read-onlyIdempotent

Whether n is a sum of three integer squares, and one nonnegative witness x <= y <= z when it is. It is impossible exactly when n = 4^power * odd with odd congruent to 7 mod 8. 3 is 1, 1, 1. 7 is impossible. n runs from 0 to 1000000. Returns JSON with: n, possible, power, odd, x, y, z. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/three-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": "three_squares"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds material context beyond them: the exact return keys (n, possible, power, odd, x, y, z), the pricing model ($0.001 USDC per successful call via x402 on Base or Solana), and an alternate HTTPS endpoint. The 'per successful call' qualifier is a genuinely useful billing nuance an agent could not infer.

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 core question, then the impossibility criterion, examples, return fields, and cost/endpoint — every sentence carries information. The telegraphic fragments ('3 is 1, 1, 1. 7 is impossible.') and the '4^power * odd' notation are slightly compressed but not wasteful.

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 one-parameter pure-computation tool with no output schema, the description supplies the predicate, the closed-form impossibility condition, the domain, the full list of returned fields, and the payment/transport details. Nothing an agent needs in order to call it and interpret the result is missing.

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?

The single parameter has 0% schema description coverage, so the description must carry the meaning; it does by defining n as the integer tested and restating the 0..1000000 domain, and the witness example clarifies the intended output form. It stops short of saying how the bounds are enforced or what happens for out-of-range input.

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?

States a specific mathematical predicate (whether n is a sum of three integer squares) plus the exact output contract (one nonnegative witness with x <= y <= z). The 'three squares' framing plus the explicit witness ordering clearly separates it from siblings like two_squares and 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the input domain (n from 0 to 1000000) and worked illustrations ('3 is 1, 1, 1', '7 is impossible') that make correct invocation obvious, but never states when to pick this tool over two_squares/four_squares or what happens outside the stated range. Usage is implied by the math rather than guided.

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