Skip to main content
Glama

Agent Data Hub

Secure random: numbers, bytes, pick, shuffle, password

util_random
Read-onlyIdempotent

Cryptographically secure randomness (CSPRNG): integers in [min,max], floats, random bytes (hex + base64), pick from a list, shuffle a list, strong passwords, coin flips or dice rolls (up to 1000 values). Use when an agent needs unbiased randomness it cannot produce itself. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

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": "util_random"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoMaximum (int default 100, float default 1; dice: sides, default 6)
minNoMinimum (int/float, default 0)
typeNoint (default), float, bytes, pick, shuffle, password, coin, dice
countNoHow many values, 1–1000 (default 1)
itemsNoComma-separated list for pick/shuffle
lengthNoBytes length (1–1024, default 32) or password length (8–128, default 20)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/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, open-world), so the description's real contribution is operational: a per-call price of $0.001 USDC on Base via x402 and a 10-calls-per-day free tier, both of which materially affect whether an agent should call this. It also discloses the hard cap of 1000 values per call. It does not describe the response envelope or error behavior for invalid ranges.

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?

Two dense sentences front-load the capability inventory, followed by a short pricing note. The mode enumeration is long but mirrors the enum and thus earns its place; nothing is duplicated wastefully.

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

Completeness4/5

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

With no output schema, the description partly compensates by stating that byte output comes back as hex and base64. Gaps remain for the other modes — pick/shuffle output shape, password character set, and whether a single value or list is returned for count=1 — but the core contract is legible.

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%, so the schema already documents every parameter including defaults, ranges, and the mode enum. The description restates the mode list and the 1000-value ceiling without adding syntax or format guidance beyond what the schema gives, so the baseline 3 applies.

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

Purpose4/5

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

The description names a specific mechanism (CSPRNG) and enumerates every mode the tool supports — integers, floats, bytes, pick, shuffle, passwords, coin, dice — which maps cleanly onto the type enum. It stops short of naming sibling tools (e.g. util_uuid, util_hash) that also produce random-looking output, so an agent must infer the boundary itself.

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

Usage Guidelines4/5

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

"Use when an agent needs unbiased randomness it cannot produce itself" gives a clear selection condition tied to a real capability gap in LLMs. There are no explicit exclusions or pointers to adjacent utilities, but the positive guidance is concrete enough to route most calls correctly.

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