generate_random
utilpeek: Generate cryptographically strong random numbers, bytes, UUIDs, dice rolls, picks and shuffles. For UUIDs and ULIDs use generate_ids. Returns values from the OS CSPRNG (Python secrets): integers (uniform, inclusive range), floats in [min, max), 1-1,024 random bytes (hex or base64), UUID...
This record as markdown: /tools/dev-tanod-tanod/generate-random.md
What generate_random does on Tanod
AI agents use generate_random to create or update resources in Tanod, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Tanod environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
max | object | — | int: highest value, inclusive (default 100). float: upper bound, exclusive (default 1); max must exceed min. |
min | object | — | int: lowest value, inclusive (default 0). float: lowest, inclusive (default 0). |
dice | object | — | dice: an expression such as 3d6, d20 or 2d10+3 (1-100 dice of 2-1000 sides, optional +/- modifier; default 1d6). |
kind | string | — | int (default), float, bytes, uuid (v4), dice, pick or shuffle. |
count | integer | — | How many values (1-1000, default 1): int, float, uuid, pick. |
items | object | — | pick / shuffle: a comma-separated list (at most 1,000 items of 200 characters; blanks are dropped). |
length | integer | — | bytes: how many random bytes (1-1024, default 16). |
unique | boolean | — | pick: draw without replacement (count at most the number of items). |
encoding | string | — | bytes: hex (default) or base64. |
Parameters from the server's own tool schema.
Why generate_random is rated Medium
An AI agent can call generate_random faster than any human can review: one bad instruction and it creates or modifies resources in Tanod by the hundred, each call as confident as the last.
Attacks that exploit this kind of access
The rule that runs generate_random safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Tanod, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For generate_random, this is the rule to start with:
generate_random stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Tanod, apply this rule, and every generate_random call is checked against it from then on.
Questions about generate_random
utilpeek: Generate cryptographically strong random numbers, bytes, UUIDs, dice rolls, picks and shuffles. For UUIDs and ULIDs use generate_ids. Returns values from the OS CSPRNG (Python secrets): integers (uniform, inclusive range), floats in [min, max), 1-1,024 random bytes (hex or base64), UUID v4, dice rolls such as 3d6 or 2d10+3 with the total, picks from a list or a shuffle. Input: optional kind, min and max, count, length and encoding, dice, items and unique; an empty body gives one integer 0-100. Parameters that do not fit the kind, count over 1,000 or more than 1,000 items are a 422 before any payment (not charged). Nothing is stored or logged. Generate secret keys locally. Typically under 0.1 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. It is categorised as a Write tool in the Tanod MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
generate_random accepts 9 parameters: max, min, dice, kind, count, items, length, unique, encoding. The full parameter table on this page comes from the server's own tool schema.
Register the Tanod MCP server in PolicyLayer and add a rule for generate_random: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Tanod. Nothing to install.
generate_random is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the generate_random rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for generate_random. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
generate_random is provided by the Tanod MCP server (https://tanod.dev/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Tanod, and thousands of servers like it.
This server
Across the catalogue