random
Generate repeatable integers, floats, or list choices with replacement from a seed; a position-based stream continues across calls for consistent, resumable results.
Instructions
Values from the seeded random stream, with replacement: integers, floats or choices from a list. The value at each position depends only on the seed, the position and the arguments, so a stream continues across calls from next_offset.
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": {
"seed": "<seed>",
"kind": "<kind>"
},
"name": "random"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| low | No | Integer bound, included in the range, as decimal digits such as "6". Ranges beyond 2^53 give their values as strings | |
| high | No | Integer bound, included in the range, as decimal digits such as "6". Ranges beyond 2^53 give their values as strings | |
| kind | Yes | What to draw: 'integer' (needs low and high), 'float' (in [0, 1)), 'choice' (needs items, optional weights) | |
| seed | Yes | Any string; secure_seed gives a fresh one. The same seed repeats results | |
| count | No | How many values to return, at most 1000 | |
| items | No | The items to draw from: any JSON values, returned as given | |
| offset | No | Position in the stream to start at, from 0, as decimal digits such as "0"; pass the last next_offset back as given | 0 |
| weights | No | Non-negative integer weights, one per item; omitted means equal |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | Yes | The seed drawn from | |
| offset | Yes | Position of the first value | |
| values | Yes | The values drawn | |
| algorithm | Yes | Version of the algorithm; results repeat only within one | |
| next_offset | Yes | The offset that continues this stream |