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. Price: $0.002 USDC per successful call (x402, 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.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing cost ('$0.002 USDC per successful call, x402, Solana'), an alternate HTTPS endpoint, the exact algorithm (HMAC-SHA256(serverSeed, clientSeed:nonce:counter) with rejection sampling and Fisher–Yates), and what the response publishes (server seed, SHA-256 commitment). This also usefully nuances the idempotentHint: unseeded calls are fresh draws, while seeded calls reproduce exactly.

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?

Four sentences, front-loaded with purpose then modes, then fairness/verification, then price and endpoint. Dense but nearly every clause carries information; the pricing and URL trailing sentence is operationally necessary rather than filler.

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 an 11-parameter tool with no output schema, it covers a lot: capabilities, verification semantics, cost, and what the response contains. Remaining gaps are mode-specific details such as how teams are balanced or how count interacts with items, which an agent must infer.

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 64%, and the description compensates for the undocumented gaps by explaining replacement semantics ('unique or with replacement, optional weights'), dice notation with worked examples ('3d6+2', '4d6kh3'), and the role of serverSeed/clientSeed. Nonce is only implied via the HMAC string and min/max are left to bare defaults, so a little is still 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?

States a specific verb+resource ('provably fair random draws') and then enumerates the concrete capabilities: pick winners, shuffle, split teams, draw integers, roll dice. The mode list maps directly onto the mode enum, so an agent can tell immediately whether this tool covers its need 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 Guidelines4/5

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

Gives clear usage context ('for giveaways, raffles, games and A/B assignment') and an explicit reproduction path: 'Supply serverSeed + clientSeed to reproduce a previous draw exactly.' It does not name an alternative or a when-not condition, and the long sibling list offers no comparable random tool, so the routing value is inherently limited, but the context is clear.

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