Skip to main content
Glama

Collatz Parity

collatz_parity
Read-onlyIdempotent

The parity of each term on the Collatz trajectory from n through 1. 0 is even and 1 is odd. The parity of 6 is 010100001. n runs from 1 to 1000000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/collatz-parity

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": "collatz_parity"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description's job is lighter here. It adds real context beyond the annotations: a per-call price of $0.001 USDC via x402 on Solana, plus an equivalent HTTPS endpoint, which matters for cost and transport decisions. The only gap is that it does not say whether a failed call is charged or what the billing constraints are.

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 purpose and the output convention are front-loaded, followed by the domain constraint and then the payment/transport details. Every sentence carries information, with the only minor redundancy being the n range, which repeats the schema's minimum and maximum.

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?

There is no output schema, so the description must explain the return value, and it does so with the 0/1 convention plus a concrete example string. It leaves out how long the string can get for large n and whether a trailing newline or formatting is applied, but for a one-parameter pure function it is nearly complete.

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% for the single parameter, so the description must carry the load, and it does: n is the Collatz starting value, it runs from 1 to 1,000,000, and the example shows how n maps to output. The stated range duplicates the schema's min/max, but the semantic framing of n is genuinely added value.

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 states a specific verb and resource: the parity of each term along the Collatz trajectory from n to 1. The worked example (6 gives 010100001) defines the output unambiguously and pragmatically distinguishes this tool from siblings such as collatz_length or collatz_steps, although those siblings are never named explicitly.

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 description states the valid input domain (n from 1 to 1000000) and the pricing model, which implies when the tool applies. However, it never tells the agent when to choose this tool over alternative Collatz tools or when not to use it, so the usage guidance is implied rather than 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