Skip to main content
Glama

generate_random

Read-only

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_random"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoint: highest value, inclusive (default 100). float: upper bound, exclusive (default 1); max must exceed min.
minNoint: lowest value, inclusive (default 0). float: lowest, inclusive (default 0).
diceNodice: an expression such as 3d6, d20 or 2d10+3 (1-100 dice of 2-1000 sides, optional +/- modifier; default 1d6).
kindNoint (default), float, bytes, uuid (v4), dice, pick or shuffle.int
countNoHow many values: int, float, uuid, pick.
itemsNopick / shuffle: a comma-separated list (at most 1,000 items of 200 characters; blanks are dropped).
lengthNobytes: how many random bytes.
uniqueNopick: draw without replacement (count at most the number of items).
encodingNobytes: hex (default) or base64.hex

Output Schema

NameRequiredDescriptionDefault
maxNo
minNo
diceNo
kindNo
countNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
rollsNo
totalNo
valueNo
lengthNo
sourceNo
uniqueNo
valuesNo
encodingNo
modifierNo
item_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • changedInput schema / properties / count / description
      Previous value: -"How many values (1-1000, default 1): int, float, uuid, pick."New value: +"How many values: int, float, uuid, pick."
    • removedInput schema / properties / count / title
      Removed value: -"Count"
    • removedInput schema / properties / dice / default
      Removed value: -null
    • removedInput schema / properties / dice / title
      Removed value: -"Dice"
    • removedInput schema / properties / encoding / title
      Removed value: -"Encoding"
    • removedInput schema / properties / items / default
      Removed value: -null
    • removedInput schema / properties / items / title
      Removed value: -"Items"
    • removedInput schema / properties / kind / title
      Removed value: -"Kind"
    • changedInput schema / properties / length / description
      Previous value: -"bytes: how many random bytes (1-1024, default 16)."New value: +"bytes: how many random bytes."
    • removedInput schema / properties / length / title
      Removed value: -"Length"
    • removedInput schema / properties / max / default
      Removed value: -null
    • removedInput schema / properties / max / title
      Removed value: -"Max"
    • removedInput schema / properties / min / default
      Removed value: -null
    • removedInput schema / properties / min / title
      Removed value: -"Min"
    • removedInput schema / properties / unique / title
      Removed value: -"Unique"
    • removedInput schema / title
      Removed value: -"generate_randomArguments"
    • removedOutput schema / properties / rolls / items
      Removed value: -{
      -  "type": [
      -    "integer",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / values / items
      Removed value: -{
      -  "type": [
      -    "integer",
      -    "number",
      -    "string",
      -    "null"
      -  ]
      -}
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources