random-web3-mcp

by suxiongye
Verified

generate_random_weighted

Select random options based on weighted probabilities for use in lotteries, item drops, task assignments, or A/B testing using EVM block hash for secure randomization.

Instructions

Weighted Random Selector

Randomly select an option based on weights Args: options (List[str]): List of options weights (List[int]): Corresponding weight list (0-1000) salt (str, optional): Random number salt value. Defaults to "". Returns: str: JSON string containing the selection result Application Scenarios: 1. Lottery systems (prizes with different probabilities) 2. Random drops (weighted item drops) 3. Task assignment (based on priority) 4. A/B testing (experiment groups with different ratios)

Input Schema

NameRequiredDescriptionDefault
optionsYes
saltNo
weightsYes

Input Schema (JSON Schema)

{ "properties": { "options": { "items": { "type": "string" }, "title": "Options", "type": "array" }, "salt": { "default": "", "title": "Salt", "type": "string" }, "weights": { "items": { "type": "integer" }, "title": "Weights", "type": "array" } }, "required": [ "options", "weights" ], "title": "generate_random_weightedArguments", "type": "object" }

You must be authenticated.

Other Tools from random-web3-mcp

Related Tools

ID: l8j1n7vnd2