Skip to main content
Glama

Odd Square Sum

odd_square_sum
Read-onlyIdempotent

The sum of the first n odd squares: 1^2 + 3^2 + ... + (2n-1)^2 = n(4n^2-1)/3. One term is 1, two terms are 10, and four terms are 84. n runs from 0 to 1000000. Past 15 digits the value is a decimal string. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/odd-square-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": "odd_square_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?

Goes well beyond the readOnly/idempotent annotations by disclosing pricing ($0.001 USDC per successful call via x402 on Solana), the HTTPS fallback endpoint, and the precision rule (decimal string past 15 digits). It does not describe error behavior for out-of-range n or response shape beyond the precision note, so not a full 5.

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-loads the formula and examples before the operational details (range, precision, pricing, endpoint). Dense but each sentence carries information; the range restatement is the only mild redundancy against the schema.

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 description covers the formula, domain, expected outputs, return-format threshold, and payment/auth context. Only the failure mode for invalid n is unstated.

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 description coverage is 0%, so the description must carry the burden; it defines n as the number of terms and anchors it with worked examples (1 term = 1, 2 terms = 10, 4 terms = 84). The 0–1000000 range is merely repeated from the schema, but the meaning of n and the expected scale of output are genuinely added.

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 verb+resource ('The sum of the first n odd squares') and disambiguates precisely with the closed form n(4n^2-1)/3 plus concrete terms. An agent can distinguish it from neighbors like square_sum or odd_goldbach without inspecting any 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?

The mathematical definition implies when the tool applies, but there is no explicit when-to-use/when-not guidance and no sibling is named (e.g. square_sum, cube_sum). Domain of n is given, which constrains usage, but alternative selection is left to inference.

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