Skip to main content
Glama
laszlopere

mcp-bytesmith

random

Generate cryptographically secure random bytes, tokens, or passphrases using OS-level CSPRNG. Supports hex, base64, url-safe, alphanumeric, and diceware formats.

Instructions

Generate cryptographically secure random bytes, a token, or a passphrase.

All randomness is drawn from the OS CSPRNG (secrets). kind selects the shape and which sizing arg applies: bytes|hex|urlsafe draw nbytes (default 32) random bytes — bytes renders them via output_format (hex/base64), hex is the same bytes as hex, urlsafe is RFC 4648 url-safe base64; token is a length-character (default 32) alphanumeric [A-Za-z0-9] string; passphrase joins words (default 6) words with separator (default '-'), drawn from wordlist or the bundled EFF large diceware list. Returns {kind, value, entropy_bits}; the value is the only secret and is never logged elsewhere. Example: random("hex", nbytes=4) -> value "6a08ed95" (8 hex chars, 32 bits)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoOutput shape: bytes|hex|urlsafe draw `nbytes` random bytes; token is `length` alphanumeric chars; passphrase joins `words` diceware words. Default 'urlsafe'.urlsafe
lengthNoCharacter count for kind=token; default None means 32.
nbytesNoByte count for kind=bytes/hex/urlsafe; default 32.
wordsNoWord count for kind=passphrase; default 6.
separatorNoJoiner between passphrase words; default '-'.-
wordlistNoCustom passphrase word list; default None uses the bundled EFF large diceware list (7776 words).
output_formatNoRendering for kind=bytes (hex/base64); default 'hex'.hex
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: randomness source (OS CSPRNG via `secrets`), output structure ({kind, value, entropy_bits}), security note that value is never logged, and detailed parameter mappings for each kind. This covers all important behavioral aspects beyond the schema.

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 lengthy but well-structured, front-loading the purpose and then detailing each `kind`. Every sentence is informative, though the example could be slightly more concise. It earns its length given the complexity of the tool.

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?

Given 7 parameters, no output schema, and no annotations, the description is remarkably complete. It explains all parameter interactions, defaults, output format options, and security considerations. No missing information is apparent for correct tool usage.

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 baseline is 3. The description adds value by explaining how `kind` selects which sizing parameter applies (e.g., nbytes for bytes/hex/urlsafe, length for token, words for passphrase), default behaviors, and provides an example. This meaningfully extends the schema's descriptions.

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 explicitly states the tool generates cryptographically secure random bytes, tokens, or passphrases, with specific verb 'generate' and resource 'random bytes/token/passphrase'. It clearly distinguishes from sibling tools focused on encoding, hashing, or data transformation.

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?

The description explains when to use each `kind` (bytes, hex, urlsafe, token, passphrase) and the relevant parameters, providing clear context for selection. However, it does not explicitly state when not to use the tool or mention alternative tools among siblings, though the unique randomness focus makes this less critical.

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

Install Server

Other Tools

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/laszlopere/mcp-bytesmith'

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