Skip to main content
Glama

ScorpTech x402 Tools

Random Draw

random_draw
Read-onlyIdempotent

Provably fair random draws for giveaways, raffles, games and A/B assignment. Pick winners from a list (unique or with replacement, optional weights), shuffle a list, split people into balanced teams, draw integers in a range, or roll dice ("3d6+2", "4d6kh3"). Randomness is HMAC-SHA256(serverSeed, clientSeed:nonce:counter) with unbiased rejection sampling and Fisher–Yates; the response publishes the server seed, its SHA-256 commitment and the algorithm so anyone can re-run and verify the draw. Supply serverSeed + clientSeed to reproduce a previous draw exactly. Returns JSON with: mode, result, indices, entries, fairness. Price: $0.002 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/random-draw

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "random_draw"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNo
minNo
diceNoDice notation: NdS(+/-M), kh/kl to keep highest / lowest, e.g. "4d6kh3", "2d20kl1", "3d6+2"1d6
modeNopick
countNoWinners (pick), numbers (integers), teams (teams)
itemsNoEntries (strings / numbers / objects) for pick, shuffle, teams; max 10,000
nonceNo
uniqueNopick / integers without replacement
weightsNopick: non-negative weight per item (with unique=true, weighted sampling without replacement)
clientSeedNoYour seed (e.g. a public value fixed before the draw)
serverSeedNoVerification: re-run a draw with its published server seed (hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the exact HMAC-SHA256 algorithm, rejection sampling, Fisher–Yates shuffling, published server seed and SHA-256 commitment, and reproducibility model. It also adds pricing and an alternative HTTPS endpoint, giving an agent rich operational context that annotations alone do not provide.

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?

The description is front-loaded with purpose and modes, then progresses to algorithm, verification, return fields, and pricing. Every sentence carries substantive information, and there is no redundant restatement of the tool name or title.

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 complex tool with 11 parameters, multiple modes, and no output schema, the description covers modes, fairness mechanics, return fields, pricing, and an alternate endpoint quite well. The main gap is that the nonce parameter is never explained even though it appears in the algorithm string, which leaves a user unsure how to set it.

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?

The description clarifies several parameters beyond the schema: unique means 'with replacement' versus without, weights are optional per-item non-negative values, and dice accepts notation like '3d6+2' or '4d6kh3'. It still leaves the nonce parameter undefined even though the algorithm mentions it, so some semantic value is missing.

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?

The description names a specific verb and resource—'random draws'—and enumerates every supported mode: pick winners, shuffle, split teams, draw integers, and roll dice. It also gives concrete use cases (giveaways, raffles, games, A/B assignment), making it immediately distinguishable from the math-focused sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by listing use cases and explaining each mode's purpose, and it explicitly notes that supplying serverSeed + clientSeed reproduces a previous draw. However, it does not state when not to use the tool or name alternative approaches, so it stops short of full when/when-not 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