Skip to main content
Glama

util_random

Read-onlyIdempotent

[PAID $0.005 USDC per call via x402 on Base; errors are free] CSPRNG (crypto.getRandomValues) with rejection sampling (no modulo bias). Optional min/max (default 0..1000000, range <= 2^32) and bytes 1-256 (default 32). Invalid input = 400, never charged.

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
maxNoInclusive max (default 1000000)
minNoInclusive min (default 0)
bytesNoRandom bytes (default 32)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/non-destructive annotations by disclosing the payment model (x402/USDC per call), that failed calls are not charged, that invalid input returns 400, and that rejection sampling eliminates modulo bias. These are material behaviors an agent cannot infer from the annotations.

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?

A single dense line with no filler, and the pricing caveat is bracketed so it does not bury the core spec. The heavy parenthetical packing of defaults, ranges and error codes makes it slightly harder to parse at a glance than a short structured sentence would be.

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?

Inputs, limits, pricing and error behavior are all covered, and annotations handle the safety profile. The one gap is the return shape: with no output schema, the description never says whether bytes come back as a hex string, base64, or array, which an agent needs in order to use the result.

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

Parameters4/5

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

Schema coverage is 100%, so defaults and bounds are already documented; the description still adds the otherwise-undocumented constraint that the min..max span must be <= 2^32, which prevents server-side rejections. It does not explain how min/max interacts with bytes (i.e. which mode is selected).

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 mechanism (CSPRNG via crypto.getRandomValues with rejection sampling) and the exact resource produced (integers in min..max, or 1-256 random bytes). This clearly separates it from util_uuid (identifiers) and util_hash (digests) among the util_* siblings.

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

Usage Guidelines3/5

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

Usage is only implied by the parameter set: pass min/max for a bounded integer, bytes for raw random bytes. There is no explicit statement of when to prefer this over util_uuid or util_hash, and no stated preconditions beyond the pricing note.

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