Skip to main content
Glama

random-web3-mcp

generate_random_weighted

Select options randomly based on predefined weights for use in lottery systems, weighted item drops, task assignment, or A/B testing with customizable probability distributions.

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" }

Other Tools from random-web3-mcp

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/suxiongye/random-web3-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server