Skip to main content
Glama

ScorpTech x402 Tools

Alternating Sum

alternating_sum
Read-onlyIdempotent

The sum of the alternating factorials from 1 through n. Through 1 it is 1, through 3 it is 7, through 5 it is 127, through 6 it is 746, and through 8 it is 41066. n runs from 1 to 18. 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/alternating-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": "alternating_sum"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description is not needed for the safety profile, yet it adds genuinely useful context: return shape ('JSON with: n, value'), per-call pricing, payment rail (x402, Base or Solana), and an equivalent HTTPS endpoint. It does not describe error behavior for out-of-range n, but for a pure function that is minor.

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 before the examples, then the constraint, return shape, and payment/endpoint details in that order. The five worked values are justifiable as disambiguation for an ambiguous math sequence, though the pricing and URL sentences could be trimmed for compactness.

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 scalar function with no output schema, the description covers definition, domain, verification examples, return keys, and access/pricing, which is close to everything an agent needs. The only remaining gaps are out-of-range behavior and explicit differentiation from similarly named sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 meaning of n; it does establish n as the upper bound ('from 1 through n') and restates the 1–18 domain. However, the range restatement duplicates the schema's minimum/maximum, and there are no details on whether n must be an integer or how invalid values are handled.

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 first sentence names the exact mathematical object ('sum of the alternating factorials from 1 through n') and the worked examples for n=1,3,5,6,8 pin down the intended sequence, so the operation is unambiguous. It does not explicitly contrast itself with close siblings such as alt_sum or alternating_factorial, which keeps it from a 5.

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 statement of when to call this versus the many sibling sum tools (alt_sum, alternating_factorial, alternating_next...). The only guidance is the domain 'n runs from 1 to 18', which constrains inputs rather than 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