Skip to main content
Glama

ScorpTech x402 Tools

Subtraction Grundy

subtraction_grundy
Read-onlyIdempotent

The Grundy value of a heap of n in the subtraction game with the given move sizes. With moves 1, 2, and 3, the value of n is n mod 4. n runs from 0 to 500, and there are 1 to 8 moves, each from 1 to 100. 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/subtraction-grundy

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>",
      "moves": "<moves>"
    },
    "name": "subtraction_grundy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes
movesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world, so the safety profile is covered. The description adds genuinely useful context beyond that: the return payload shape (n, value), the pricing model ($0.001 USDC per successful call via x402 on Base or Solana), and the equivalent HTTPS endpoint, which an agent needs to know for a paid call. It stops short of describing failure behavior on invalid input or payment rejection, so a 4 rather than a 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?

The description is short and front-loaded: the definition comes first, then the example, then constraints, then return shape and cost. Every sentence carries information, though the pricing/endpoint sentence is denser and more operational than definitional, slightly interrupting the flow of the computational description.

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 simple deterministic two-parameter computation with no output schema, the description covers the definition, a worked example, all bound constraints, the return fields, and the access/payment model. The main remaining gap is error behavior for out-of-range or invalid moves, which is minor given the schema already enforces the bounds.

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 parameter burden: it does explain that n is the heap size and moves are the permitted subtraction sizes, which is real meaning beyond the bare JSON types. However, the numeric constraints it repeats (0–500, 1–8 moves of 1–100) are already encoded in the schema, and it says nothing about whether moves must be distinct or ordered, so the added semantic value is modest.

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?

The description names a precise mathematical object ('the Grundy value of a heap of n in the subtraction game with the given move sizes'), which is a specific computable resource rather than a generic 'compute' verb. It also distinguishes itself from the subtraction_row/subtraction_win siblings by naming the Grundy value explicitly, and the worked example (moves 1,2,3 → n mod 4) pins down the exact semantics.

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 only implied: an agent can infer it should call this when it wants a Grundy value for a subtraction game, but the description never says when to prefer it over the sibling subtraction tools, nor does it state any preconditions or exclusions. There is no explicit

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