Skip to main content
Glama

get_random

Generate cryptographically secure random integers or bytes, returning uniform values without modulo bias for use in nonces, IDs, sampling, and shuffling.

Instructions

Cryptographically secure randomness for agents that are deterministic or sandboxed and cannot generate their own: uniform integers in [min, max] (rejection-sampled, no modulo bias) or raw random bytes as hex and base64. For nonces, IDs, sampling and shuffling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoUpper bound (inclusive) for integer mode.
minNoWith max: return uniform integers in [min, max] inclusive.
bytesNoRandom bytes to return, 1..1024. Default 32 when no integer range is given.
countNoHow many integers, 1..1000. Integer mode only.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden. It discloses cryptographic security, rejection sampling to avoid modulo bias, and output formats. This is transparent about the tool's behavior and guarantees.

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?

The description is information-dense but not overly long. It front-loads the core purpose and then details specifics, making it efficient to parse.

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?

No output schema exists, but the description explains what is returned (integers or bytes in hex/base64) and the modes. This is adequate for an agent to understand the tool's output without further detail.

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

Parameters5/5

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

Despite 100% schema coverage, the description adds crucial context: 'inclusive' bounds, default of 32 bytes, and that count applies only in integer mode. This clarifies parameter behavior beyond the schema.

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?

The description clearly states the tool provides cryptographically secure randomness, either uniform integers in a range or random bytes in hex/base64. This distinguishes it from sibling tools that focus on data retrieval or calculations.

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?

It explicitly mentions use cases like nonces, IDs, sampling, and shuffling, giving clear guidance on when to invoke. It does not explicitly mention when not to use, but the purpose is sufficiently specific.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/donnywin85/dex-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server