random_weighted_choice
Pick a random option from a list using weighted probabilities, leveraging secure randomness for fair and unbiased decisions.
Instructions
Select an option based on weighted probabilities
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": {
"options": "<options>",
"weights": "<weights>"
},
"name": "random_weighted_choice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | Yes | Array of options | |
| weights | Yes | Array of weights (same length as options) |