Skip to main content
Glama

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

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

Annotations already cover read-only, idempotent, non-destructive and open-world behavior, so the description's job is to add what they don't say — and it does: pricing ($0.001 USDC per successful call, x402 on Solana) and an alternate raw HTTPS endpoint. The x402 mention usefully implies a payment/auth prerequisite, though it doesn't spell out how payment is settled or what a failed/paid call does.

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 example are front-loaded in the first two sentences; range constraints and the worked example follow logically. The pricing and endpoint sentences are somewhat tangential to invocation but do carry information an agent may need for payment setup, so they earn their place.

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 2-parameter computational tool with no output schema, the description gives enough: what the output means (a Grundy value, illustrated by n mod 4), the valid input bounds, and the cost/payment channel. Missing only edge-case behavior such as duplicate moves or what happens on invalid input.

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?

With 0% schema description coverage the description must carry the load, and it explains n as the heap size and moves as the subtraction move set, including the permissible ranges. The concrete example (moves {1,2,3} gives n mod 4) meaningfully conveys what the parameters produce as output. It stops short of clarifying whether move order or duplicates matter.

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 specific mathematical object and operation: the Grundy value of a heap of size n for a given move set in a subtraction game. An agent can tell what it computes. However, it never distinguishes itself from close siblings like subtraction_win, subtraction_row, mex, or nim_sum, so routing still requires guessing.

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 pick this tool over subtraction_win/subtraction_row/nim_sum, nor any prerequisites or exclusions. The worked example (moves 1,2,3 → n mod 4) helps an agent sanity-check an intended call but is not usage 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