Skip to main content
Glama

Random numbers

blackwood_random_generate
Read-onlyIdempotent

Use when you need a random number generator, dice rolls, a coin flip, a uuid or random bytes that no one can predict. Do not use for verifiable on-chain randomness (VRF) or reproducible seeded sequences. Returns JSON with cryptographically secure random values: integers in a range, dice rolls, coin flips, UUIDs or hex bytes, from the Workers Web Crypto CSPRNG for 0.005 USDC per call. Typical response time 500 ms (p95). Category: Infrastructure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNointeger: highest value, inclusive (default 100)
minNointeger: lowest value, inclusive (default 1)
kindYesinteger (count values between min and max), dice (count rolls of a die with sides faces), coin (count flips), uuid (count UUID v4) or bytes (length random bytes as hex)
countNoHow many values (1-100, default 1); ignored for bytes
sidesNodice: faces of the die (default 6)
lengthNobytes: how many random bytes (1-256, default 32)
response_formatNoconcise (the default when omitted) keeps the JSON short: long fields such as base64 images or audio come back as separate image/audio content blocks and other long strings are cut with a marker; detailed returns the full JSON

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "generatedAt": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "type": "string"
      -      },
      -      "source": {
      -        "type": "string"
      -      },
      -      "sum": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "values": {
      -        "items": {
      -          "type": [
      -            "number",
      -            "string"
      -          ]
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "values",
      -      "sum",
      -      "generatedAt",
      -      "source"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      -    "properties": {
      -      "accepts": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": "string"
      -      },
      -      "extensions": {
      -        "type": "object"
      -      },
      -      "resource": {
      -        "type": "object"
      -      },
      -      "x402Version": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "x402Version",
      -      "accepts"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "generatedAt": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "type": "string"
      +      },
      +      "next": {
      +        "additionalProperties": false,
      +        "description": "Suggested next paid call in the same family (call it in a loop when the task continues)",
      +        "properties": {
      +          "method": {
      +            "enum": [
      +              "GET",
      +              "POST"
      +            ],
      +            "type": "string"
      +          },
      +          "sample": {
      +            "description": "Free fixed sample of the whole family",
      +            "type": "string"
      +          },
      +          "service": {
      +            "description": "Service id of the suggested next paid call",
      +            "type": "string"
      +          },
      +          "tool": {
      +            "description": "MCP tool name of the same call",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Paid route of the next call",
      +            "type": "string"
      +          },
      +          "useWhen": {
      +            "description": "When the next call is the right one",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "service",
      +          "tool",
      +          "method",
      +          "url",
      +          "useWhen",
      +          "sample"
      +        ],
      +        "type": "object"
      +      },
      +      "source": {
      +        "type": "string"
      +      },
      +      "sum": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "values": {
      +        "items": {
      +          "type": [
      +            "number",
      +            "string"
      +          ]
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "values",
      +      "sum",
      +      "generatedAt",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      +    "properties": {
      +      "accepts": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": "string"
      +      },
      +      "extensions": {
      +        "type": "object"
      +      },
      +      "resource": {
      +        "type": "object"
      +      },
      +      "x402Version": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "x402Version",
      +      "accepts"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), but the description adds material context they do not: the CSPRNG source (Workers Web Crypto), the price (0.005 USDC per call), and p95 latency (500 ms). It does not mention rate limits or error behavior, so it stops short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the trigger condition and the exclusion, and the cost/latency facts earn their place. The trailing 'Category: Infrastructure' is filler that adds no invocation value, keeping it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be re-explained, yet the description still summarizes the shape (JSON with secure random values). Combined with source, pricing, latency, and the explicit exclusions, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every parameter (min/max/count/sides/length/kind/response_format) is already documented in the schema, so the baseline is 3. The description restates the kind vocabulary in prose but adds no syntax, defaults, or constraints beyond what the schema already carries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (random number generator) and enumerates the exact output kinds: integers in a range, dice rolls, coin flips, UUIDs, hex bytes. It explicitly distinguishes itself from the on-chain VRF and seeded-sequence cases, so an agent can tell it apart from siblings without reading the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit 'use when' trigger list and an explicit 'do not use' clause naming two alternatives (verifiable on-chain randomness / VRF, reproducible seeded sequences). Both the positive and negative conditions are stated, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources