random_token
Generate a cryptographically random token string (for ids, passwords, nonces).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| length | No | ||
| charset | No | alphanumeric, hex, urlsafe, numeric, ascii, or a custom character string | alphanumeric |
Generate a cryptographically random token string (for ids, passwords, nonces).
| Name | Required | Description | Default |
|---|---|---|---|
| length | No | ||
| charset | No | alphanumeric, hex, urlsafe, numeric, ascii, or a custom character string | alphanumeric |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose one genuinely important trait: the output is 'cryptographically random', which tells the agent this is a secure generator rather than a weak pseudo-random one. It says nothing about entropy source guarantees, rate limits, or what the returned value looks like beyond being a string.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler and zero redundancy; purpose and use cases land immediately. It is arguably a touch thin for a tool whose parameters are half-documented, but it is not bloated and every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations, no output schema, and one of two parameters undocumented, the description should carry more weight than it does. It omits the default length (32), the default charset behavior, and the token's character composition, all of which an agent needs to call it correctly without guessing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 50%: the charset enum-ish values are documented but 'length' has no description at all. The tool description never mentions either parameter, so it does not compensate for the gap, leaving the 'length' parameter wholly undocumented across schema and description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Generate a cryptographically random token string') plus concrete use cases (ids, passwords, nonces), so the purpose is unambiguous. It does not, however, distinguish itself from the sibling uuid_generate, which is a closely related random-identifier tool an agent could easily confuse it with.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parenthetical '(for ids, passwords, nonces)' implies the contexts where this tool fits, which is more than nothing. But it offers no when-not guidance and never mentions uuid_generate or hash_text, the siblings whose territory overlaps most, so the agent is left to infer selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.