Skip to main content
Glama

Collatz Length

collatz_length
Read-onlyIdempotent

The number of Collatz steps from n until 1. The length of 1 is 0, the length of 6 is 8, and the length of 27 is 111. 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-length

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

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 safety (readOnly, idempotent, non-destructive, openWorld), so the bar is lower; the description still adds genuinely useful operational context beyond them: a per-call price of $0.001 USDC, the x402/Solana payment mechanism, and an equivalent HTTPS endpoint. It does not say what happens on invalid input or whether errors are still billed, which keeps it short of 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?

Front-loaded with the definition, then the examples, then the domain, then commercial/transport details — a sensible ordering. The three examples are the most useful part and earn their space, but restating 'n runs from 1 to 1000000' duplicates the schema bounds and is mild filler.

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, and the description fully compensates by defining the return value via worked examples. For a single-integer-input, read-only math tool it supplies everything an agent needs to call it and interpret the result, plus cost and alternate transport.

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 coverage is 0%, so the description must carry the load, and it does: n is established as the starting value, the bounds are restated (1 to 1000000, duplicating the schema's min/max), and the three examples implicitly define the semantics of the computed result. It stops short of naming edge behavior (e.g. maximum step counts within the range).

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 verb+resource: the number of Collatz steps from n until 1, with three concrete worked examples (1→0, 6→8, 27→111) that pin down the convention in use. The only gap is sibling differentiation: the tool list contains collatz_steps, collatz_step, collatz_glide, collatz_drop and others, and the description never says how this differs from them.

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 domain (compute total stopping time for a starting value in 1..1000000) but never stated as when-to-use. With near-duplicate siblings like collatz_steps present, the absence of any 'use this instead of X' routing is a real gap, though the examples make the intended computation fairly unambiguous.

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