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. Returns JSON with: n, k, value. Price: $0.001 USDC per successful call (x402, Base or 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.7/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so safety is covered. The description contributes real extras: the return shape (n, k, value), the $0.001 USDC x402 price on Base or Solana, and a mirrored HTTPS endpoint. It says nothing about error or payment-failure behavior, so it is additive but not complete.

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 examples, bounds, return shape, and access/pricing details — a sensible order with little waste. The one-person edge-case sentence is somewhat redundant with min=2 in the schema but still clarifies intent.

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 simple two-integer pure function with no output schema, the description supplies the return fields, bounds, edge case, cost, and an alternate transport, which is nearly everything an agent needs. Counting semantics for k larger than the worked examples (e.g., whether the count offsets after a removal) remain implicit.

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 the number of people in the circle and k is the step size, both illustrated concretely, plus the note that a one-person circle has nobody to eliminate (explaining why n starts at 2). The numeric ranges merely repeat the schema's minimum/maximum, which weakens it slightly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific computed quantity ("the first person eliminated in the Josephus circle") and pins it down with two worked examples (5 people/2nd step → person 2; 3rd step → person 3). Those examples effectively distinguish it from siblings that return the full elimination order or a single person's position, so an agent can pick it without opening the schema.

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?

Gives no when-to-use or when-not-to-use guidance and never names an alternative such as josephus_order or josephus_place for the full sequence or a specific position. Only hard constraints (n 2–10000, k 1–10000) are offered, which is scope rather than 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