Skip to main content
Glama

Collatz Odd

collatz_odd
Read-onlyIdempotent

How many odd terms appear before the Collatz path reaches 1. The final 1 is not counted. 1 and 2 give 0, 3 and 6 give 2, and 7 gives 5. n runs from 1 to 100000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/collatz-odd

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_odd"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

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 cover readOnly/idempotent/non-destructive, and the description adds genuinely new behavioral facts: the call is paid ($0.001 USDC via x402 on Solana), an HTTPS equivalent endpoint exists at a specific URL, and the input domain is capped at 100000. It does not mention failure modes (out-of-range n, payment failure handling), but the cost and transport disclosure goes well beyond the annotation set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the definition, then the counting caveat, then verifying examples, then domain and pricing/endpoint — every sentence adds a distinct fact with no filler. Appropriate length for a single-parameter math tool with no output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 convey the return value, and it does so precisely, including the edge-case rule that the terminal 1 is excluded from the count, backed by three concrete input/output pairs. Range and cost/transport details round it out; nothing needed to call it correctly is missing.

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?

The schema has one parameter with 0% description coverage, so the description must carry the meaning. 'n runs from 1 to 100000' merely restates the schema's minimum/maximum, but the worked examples ('3 and 6 give 2') implicitly establish that n is the starting integer of the Collatz sequence, which is the key semantic the schema omits.

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 measurable quantity — the number of odd terms in a Collatz trajectory before reaching 1 — with a verb-like framing of what is computed, plus an explicit counting convention ('The final 1 is not counted'). It is distinguishable in substance from siblings like collatz_length or collatz_steps, but it never names or contrasts those siblings, leaving the agent to infer the distinction from names alone.

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 implied by the worked examples (1 and 2 give 0, 3 and 6 give 2, 7 gives 5) which let an agent confirm the semantics before calling. However, there is no explicit statement of when to prefer this over collatz_length, collatz_parity, or collatz_steps, and no guidance on error behavior outside 1–100000.

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