Skip to main content
Glama

ScorpTech x402 Tools

Josephus First

josephus_first
Read-onlyIdempotent

The first person eliminated in the Josephus circle. With 5 people and every 2nd, person 2 leaves first. With every 3rd, person 3 leaves first. A circle of one person has nobody to eliminate. n runs from 2 to 10000 and k from 1 to 10000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/josephus-first

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>",
      "k": "<k>"
    },
    "name": "josephus_first"
  }
}

Input Schema

NameRequiredDescriptionDefault
kYes
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?

Annotations already declare readOnly, idempotent, non-destructive behavior, so the bar is lower; the description still adds real operational context that no annotation carries — the $0.001 USDC per-successful-call x402/Solana payment model and an equivalent HTTPS endpoint (POST /api/x402/v1/josephus-first). What it omits is the return shape, i.e. whether the eliminated person is returned as a 1-indexed position or a remaining-person label.

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 two worked examples, then bounds, then pricing and the HTTPS alternative — each sentence adds a distinct piece of information with no repetition. Two examples used to pin down k is justified given the 0% schema coverage.

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 two-integer, side-effect-free computation with rich annotations and no output schema, the description supplies essentially everything needed to call it correctly: domain bounds, interpretation of both parameters via example, cost, and a transport alternative. The only gap is the exact form of the returned value and what happens at the n=1 boundary (stated as having nobody to eliminate, but not as an error vs. a defined result).

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 parameter meaning. It does bind the names to bounds ('n runs from 2 to 10000 and k from 1 to 10000') and the examples implicitly define n as the circle size and k as the counting step, but the semantics are conveyed only by example rather than stated directly.

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 description states a specific verb+resource relationship: 'The first person eliminated in the Josephus circle,' making the computed quantity unambiguous. It does not, however, distinguish itself from close siblings such as josephus_place, josephus_order, or josephus_k2, which an agent would need in order to be confident this is the right variant.

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 — the definition and worked examples let an agent infer the applicable domain (n>=2 rotation with step k). There is no explicit statement of when to prefer this over josephus_place or josephus_order, nor any exclusion such as the degenerate single-person case, which is mentioned only as trivia rather than as a guard.

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