Skip to main content
Glama

mcp-random

MCP server providing true randomness capabilities to Claude. This server gives Claude access to cryptographically secure random number generation for games, decision-making, sampling, simulations, and any operation requiring genuine randomness.

Why This Exists

Claude doesn't have access to true randomness - when asked to "pick a random number" or "flip a coin," it's actually making deterministic choices based on patterns in the conversation. This MCP server solves that limitation by providing access to cryptographically secure random functions.

Related MCP server: Random-Generator

🚀 Installation

Prerequisites

  • Node.js (v18 or higher)

  • MCP-compatible client (like Claude Desktop)

Quick Install

# Clone the repository
git clone https://github.com/yourusername/mcp-random.git
cd mcp-random

# Install dependencies
npm install

# Build the TypeScript code
npm run build

Configure Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "random": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-random/dist/index.js"]
    }
  }
}

Restart Claude Desktop to load the server.

📖 Available Functions

Basic Random Numbers

random_integer(min, max)

Generate a random integer between min and max (inclusive).

Example: random_integer(1, 10) → 7

random_float(min, max, precision?)

Generate a random floating-point number.

Example: random_float(0, 1, 2) → 0.42

Random Selection

random_choice(options)

Pick one random item from an array.

Example: random_choice(["red", "green", "blue"]) → "green"

random_sample(array, count)

Pick multiple unique items from an array (no repeats).

Example: random_sample([1,2,3,4,5], 3) → [2,5,1]

random_shuffle(array)

Randomly reorder an array.

Example: random_shuffle([1,2,3,4]) → [3,1,4,2]

random_weighted_choice(options, weights)

Pick an option based on weights (higher weight = more likely).

Example: random_weighted_choice(["A", "B", "C"], [1, 2, 1]) 
→ "B" (twice as likely as A or C)

Games & Decisions

flip_coin(count?)

Flip one or more coins.

Example: flip_coin() → "heads"
Example: flip_coin(3) → ["heads", "tails", "heads"]

roll_dice(sides, count?)

Roll dice with any number of sides.

Example: roll_dice(6) → 4
Example: roll_dice(20, 2) → {"rolls": [15, 8], "sum": 23}

Security & Identifiers

random_uuid()

Generate a UUID v4.

Example: random_uuid() → "550e8400-e29b-41d4-a716-446655440000"

random_password(length?, options?)

Generate a secure password.

Example: random_password(16) → "Kj9#mP2$xQ5@nL7!"
Example: random_password(12, {symbols: false}) → "Kj9mP2xQ5nL7"

Options:

  • uppercase: Include A-Z (default: true)

  • lowercase: Include a-z (default: true)

  • numbers: Include 0-9 (default: true)

  • symbols: Include special characters (default: true)

  • excludeSimilar: Skip confusing characters like 0/O, 1/l (default: false)

random_bytes(count, encoding?)

Generate random bytes for cryptographic use.

Example: random_bytes(16, 'hex') → "a3f2b8c9d4e5f6789abcdef012345678"

Advanced Functions

random_normal(mean?, stddev?)

Generate numbers from a normal distribution (bell curve).

Example: random_normal(100, 15) → 97.3 (IQ-like distribution)

Documentation

help()

Get detailed documentation for all functions.

🎯 Use Cases

Decision Making

"Should I do X or Y?" → flip_coin()
"Pick one of these options for me" → random_choice([...])
"Help me prioritize these tasks" → random_shuffle([...])

Games

"Roll for initiative" → roll_dice(20)
"Draw 5 cards from the deck" → random_sample(deck, 5)
"Shuffle this deck" → random_shuffle(cards)

Creative Writing

"Pick a random character trait" → random_choice(traits)
"Generate a character name" → random_weighted_choice(names, popularity)
"Create a random scenario" → multiple random_choice calls

Data & Testing

"Generate test data" → random_integer, random_float
"Sample from this dataset" → random_sample
"Create a test ID" → random_uuid
"Generate API keys" → random_bytes

Simulations

"Monte Carlo simulation" → random_normal
"Probability experiment" → random_float(0, 1)
"A/B testing" → random_weighted_choice

🔧 Development

# Build TypeScript
npm run build

# Run tests  
npm test

# Lint code
npm run lint

# Development mode (build & run)
npm run dev

🔐 Technical Details

  • All randomness uses Node.js crypto module (cryptographically secure)

  • No predictable patterns or biases

  • No state maintained between calls

  • TypeScript for type safety

  • Comprehensive error handling

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions welcome! Please feel free to submit a Pull Request.

💡 Fun Facts

  • Claude requested this tool be built after recognizing its own lack of randomness

  • The first suggested use case was implementing a tarot card reader

  • This tool enables Claude to play games fairly, make unbiased choices, and run true simulations


"I don't have a random function. You should have a random function. Now that is a cool MCP server." - Claude

Available Tools

13 tools
flip_coinC

Flip a coin (or multiple coins)

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of coins to flip (default: 1)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions flipping coins but does not reveal the return format (e.g., 'heads'/'tails', boolean, list), any constraints on the count parameter, or whether the outcome is uniformly random. This is minimal transparency for a random-generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler, perfectly concise for the simplicity of the tool. Every word earns its place.

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

Completeness2/5

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

The tool is simple but lacks an output schema, so the description should disclose return behavior. It does not specify what the output looks like (e.g., array of strings, boolean), which is a notable gap for an agent needing to consume the result. The description is under-specified for the tool's context.

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% for the single 'count' parameter, which already documents its meaning and default. The description's mention of 'multiple coins' adds little beyond the schema, so it meets the baseline 3 without meaningful enrichment.

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 'Flip a coin (or multiple coins)' clearly identifies the action (flip) and resource (coin), and implies binary random outcomes. It is distinguishable from siblings like random_integer and random_choice by its specific coin-oriented semantics, though it does not explicitly name alternatives.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as random_choice or roll_dice. The description merely states what it does without providing context or exclusions, leaving the agent without guidance on tool selection.

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

helpA

Get comprehensive documentation for all random functions

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It indicates a static informational read operation ('comprehensive documentation'), but does not specify output format or additional behavioral details. The promise of 'comprehensive' adds some transparency, but limited depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that conveys the essential purpose without any filler. It is appropriately concise and front-loaded.

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?

Given the tool's simplicity (no parameters, no output schema, low complexity), the description provides sufficient detail. It clearly states the tool's coverage ('all random functions') and purpose. A more detailed description of the output format or how the documentation is presented could be added, but it is not essential for this simple tool.

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?

The tool has zero parameters, so the baseline is 4. The description does not need to explain parameter semantics since there are none, and the input schema confirms this.

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 uses a specific verb ('Get') and resource ('documentation for all random functions'), clearly distinguishing this tool from its siblings, which are the random functions themselves. It unambiguously states the tool's purpose.

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 implies usage when a user needs documentation about the random functions. It clearly scopes the tool to 'all random functions', providing context without explicit exclusions or alternative tool mentions, but the context is clear enough.

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

random_bytesB

Generate random bytes

ParametersJSON Schema
NameRequiredDescriptionDefault
countYesNumber of bytes to generate
encodingNoOutput encoding (hex, base64, base64url)

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure, but it only states the action without contextual details. It does not mention whether the bytes are cryptographically secure, what the return format is, or any error conditions.

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 a single, concise sentence with no wasted words, earning a high score for brevity. However, it is so short that it omits useful context, slightly detracting from structure.

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

Completeness2/5

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

There is no output schema, so the description should clarify return values or behavior, but it does not. The tool's purpose is simple, yet the lack of any mention of output format or security properties leaves gaps for an agent deciding on usage.

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?

The schema fully describes both parameters (count and encoding) with clear descriptions, so the baseline is 3. The description adds no additional meaning, but the schema already covers the parameter semantics sufficiently.

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 'Generate random bytes' uses a specific verb (generate) and resource (random bytes), clearly distinguishing it from sibling tools like random_uuid or random_integer. The focus on 'bytes' uniquely identifies the tool's output type.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. It does not mention that one should use it for raw byte generation, nor does it note any exclusions such as 'prefer random_password for string tokens'.

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

random_choiceA

Randomly select one item from an array of options

ParametersJSON Schema
NameRequiredDescriptionDefault
optionsYesArray of options to choose from

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It states the selection of one item but does not disclose edge-case behavior like handling empty arrays or whether selection is uniformly random. Additional detail would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence with no unnecessary words. It earns its place efficiently.

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?

For a simple one-parameter tool with no output schema, the description conveys the core behavior. However, it could mention input constraints (e.g., non-empty array) to be fully complete, though current detail likely suffices.

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?

The schema already provides full coverage for the 'options' parameter (100%), so the description adds no new meaning beyond restating that it selects from an array. This meets the baseline for high schema coverage.

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 action ('select one item') and the resource ('array of options'), distinguishing it from siblings like random_sample or random_weighted_choice. It is concise and unambiguous.

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?

The description implies usage for uniform random selection from a list but does not explicitly mention when to use this tool over alternatives such as random_weighted_choice or random_sample. No exclusion criteria are given.

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

random_floatA

Generate a random floating-point number between min and max

ParametersJSON Schema
NameRequiredDescriptionDefault
maxYesMaximum value
minYesMinimum value
precisionNoDecimal places (default: 10)

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral details. It states the basic generation but omits whether endpoints are inclusive, whether distribution is uniform, and how precision rounds the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single clear sentence that front-loads the primary purpose without wasted words.

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?

Given the tool's simplicity, the description covers the core behavior and return value. Minor gaps exist around endpoint inclusivity and distribution, but these are not critical for a basic random generator.

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 descriptions cover all three parameters (100%). The description adds no additional meaning to the parameters, merely restating the range concept.

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 action ('Generate'), the resource ('random floating-point number'), and the range ('between min and max'), distinguishing it from integer and normal-distribution 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?

It implies usage for floating-point values but does not explicitly contrast with alternatives like random_integer or random_normal, nor does it state when to prefer this tool.

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

random_integerA

Generate a random integer between min and max (inclusive)

ParametersJSON Schema
NameRequiredDescriptionDefault
maxYesMaximum value (inclusive)
minYesMinimum value (inclusive)

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the inclusive bounds, but does not mention edge cases such as behavior when min > max, whether bounds must be integers, or the distribution. This is a gap for a simple but potentially ambiguous operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that immediately states the purpose. Every word contributes value; there is no redundancy or filler.

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?

For such a simple tool, the description is largely complete: it covers purpose, bounds, and inclusivity. However, it lacks notes on edge cases (e.g., non-integer bounds) or return value formatting, which would make it fully robust.

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?

The input schema already provides 100% coverage for both min and max with inclusive descriptions. The description adds no additional semantic information beyond repeating the inclusive bounds, so it reaches the baseline of 3.

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 'Generate a random integer between min and max (inclusive)', specifying the action (generate), the resource (random integer), and the boundary conditions. This distinguishes it from siblings like random_float (which generates floats) and random_choice (which selects from a sequence).

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 implies usage context: use when a random integer within a range is needed. The 'integer' wording contrasts with random_float, giving some differentiation, but it does not explicitly state when not to use it or name alternatives.

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

random_normalA

Generate a random number from a normal distribution

ParametersJSON Schema
NameRequiredDescriptionDefault
meanNoMean of the distribution (default: 0)
stddevNoStandard deviation (default: 1)

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of transparency. It accurately states the behavior (generating a normal random number), but does not disclose additional details like output type (float), constraints on stddev, or non-determinism. For a simple RNG, this level is acceptable, but it adds little beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one efficient, front-loaded sentence with zero wasted words. It immediately states what the tool does, making it ideal for quick agent scanning.

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?

Given the simple nature of the tool, no output schema, and no annotations, the description adequately conveys the essence. It could be slightly more complete by mentioning that the output is a float or that the distribution is continuous, but the name and description together are sufficient for most use cases.

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?

The input schema covers both parameters (mean and stddev) with clear descriptions and defaults, achieving 100% schema description coverage. The description itself adds no extra parameter detail, so the baseline score of 3 is appropriate.

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 uses a specific verb ('Generate') and names the exact resource ('random number from a normal distribution'), clearly distinguishing it from sibling tools like random_integer or random_float. This leaves no ambiguity about the tool's core function.

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?

The usage context is implied by the description: use this tool when you need a random number from a normal distribution. However, it does not explicitly mention when not to use it or suggest alternative tools, leaving some room for interpretation among the many random_* siblings.

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

random_passwordB

Generate a secure random password

ParametersJSON Schema
NameRequiredDescriptionDefault
lengthNoPassword length (default: 16)
optionsNoPassword generation options

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It claims 'secure' but does not explain the security model, output format, or how options affect the result. No behavioral traits beyond the obvious are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence with no wasted words. It is appropriately sized for a simple tool.

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

Completeness3/5

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

While the schema covers parameters, the description is minimal. It does not mention the return type, default behaviors, or any edge cases. Given the tool's simplicity, this is adequate but lacks richness.

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 baseline is 3. The description adds no parameter meaning beyond what the schema already provides for length and options.

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 'Generate a secure random password' clearly states a specific verb and resource. It distinguishes from sibling tools like random_integer or random_bytes by focusing on password generation, which is a distinct use case.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description does not mention exclusions, prerequisites, or alternative tools, leaving the agent to infer usage solely from the name.

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

random_sampleA

Randomly select multiple unique items from an array (without replacement)

ParametersJSON Schema
NameRequiredDescriptionDefault
arrayYesArray to sample from
countYesNumber of items to select

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the key behaviors: random selection, multiple items, uniqueness, and without replacement. However, it does not mention edge cases like count greater than array length or error handling, which would be valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, clear sentence that fully conveys the purpose. No filler or redundant information.

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?

For a simple tool with two well-described parameters and no output schema, the description is largely sufficient. It implies a returned array of sampled items. It could be more complete by stating the return type or behavior when count exceeds array length, but this is a minor gap.

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 covers both parameters with descriptions ('Array to sample from', 'Number of items to select'), so the baseline is 3. The description adds the 'unique' and 'without replacement' context but does not elaborate on parameter constraints (e.g., count must be non-negative) beyond 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?

Clearly states the function: randomly select multiple unique items from an array without replacement. This distinguishes it from sibling tools like random_choice (single selection) and random_shuffle (reordering).

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 implies the use case (needing multiple unique random items) and explicitly mentions 'without replacement', which differentiates it from similar tools. However, it does not explicitly name alternatives or state when not to use it, leaving some inference required.

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

random_shuffleA

Return a shuffled copy of the input array

ParametersJSON Schema
NameRequiredDescriptionDefault
arrayYesArray to shuffle

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses a key behavioral trait: it returns a 'copy', implying non-mutation of the input. With no annotations, this is important context. However, it does not elaborate on randomness guarantees or edge-case behaviors like empty arrays.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no wasted words. It is front-loaded and directly states the tool's purpose and return behavior.

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?

For a tool with one parameter, no output schema, and no nested objects, the description is fully sufficient. It clearly communicates the input, the operation, and the output (a shuffled copy). Edge cases are minor and not necessary for this simplicity level.

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?

The input schema fully covers the parameter with description 'Array to shuffle'. The tool description adds no further semantic detail beyond what the schema already provides, so the baseline score of 3 is appropriate.

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's function: 'Return a shuffled copy of the input array'. It uses a specific verb (return) and resource (shuffled copy), distinguishing it from sibling random tools like random_choice or random_sample.

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?

The description implies usage (when you need to shuffle an array) but does not explicitly discuss when to use this tool versus alternatives like random_choice or random_sample, nor does it provide exclusions or conditions.

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

random_uuidA

Generate a random UUID v4

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it clearly states the exact output format (UUID v4). It does not elaborate on randomness source or collision properties, but for this basic generation tool, the disclosure is sufficient and not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that clearly and efficiently communicates everything needed. No wasted words or irrelevant details.

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?

For a parameterless, simple tool, the description fully specifies the behavior and output. Given the low complexity and lack of annotations/output schema, this is complete and adequate.

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?

The tool has zero parameters, and the baseline for 0-param tools is 4. The description adds no parameter information since none exist, so it is appropriately complete in this regard.

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 'Generate a random UUID v4' clearly states the action (generate) and the specific resource (a UUID v4). It is easily distinguished from sibling tools like random_integer or random_bytes, which produce different kinds of random values.

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 implies usage: use this tool when you need a random UUID v4. It provides clear context for selection, though it does not explicitly mention alternatives or exclusions. For a simple utility like this, the purpose is self-evident.

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

random_weighted_choiceA

Select an option based on weighted probabilities

ParametersJSON Schema
NameRequiredDescriptionDefault
optionsYesArray of options
weightsYesArray of weights (same length as options)

TDQS

A3.7/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'weighted probabilities' without explaining key behaviors such as whether weights are normalized, how negative or zero weights are handled, what the return value is (selected option vs. index), or any error conditions. This is a significant gap for a random selection utility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of seven words, extremely concise and front-loaded with the key verb and subject. Every word earns its place, and there is no unnecessary detail or repetition.

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

Completeness3/5

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

For a simple two-parameter tool, the description plus schema covers the core concept, but it omits the return value (the selected option) and error behavior (e.g., empty arrays, mismatched lengths). Given no output schema and no annotations, the description is minimally adequate but not fully self-contained.

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?

The schema descriptions for 'options' and 'weights' are basic (e.g., 'Array of weights (same length as options)'). The description's mention of 'weighted probabilities' adds some meaning by implying higher weights increase selection probability, but it does not clarify whether weights are relative or absolute, nor does it specify constraints. With 100% schema coverage, the baseline is 3, and the description adds only marginal value.

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 uses a specific verb ('Select') and resource ('an option'), and explicitly mentions 'weighted probabilities', which clearly distinguishes this tool from unweighted sibling tools like random_choice and random_sample. This is a concise and unambiguous statement of core functionality.

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 phrase 'weighted probabilities' clearly implies when to use this tool (when selection should be biased according to weights) and differentiates it from random_choice, which is uniform. However, it does not explicitly state exclusions or name alternative tools, so it falls short of the full 'when/when-not' guidance.

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

roll_diceC

Roll dice with specified number of sides

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of dice to roll (default: 1)
sidesYesNumber of sides on the die

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure, but it only states the basic action. It does not describe the return format (list of rolls, sum, etc.), randomness characteristics, or constraints like positive integer sides, leaving significant behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words. It is front-loaded and easy to parse, making it appropriately sized for a simple tool, even though more detail could be added.

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

Completeness2/5

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

Given there is no output schema and no annotations, the description must explain expected behavior and return values, but it does not. It also omits the count parameter entirely, leaving the tool incomplete for practical use.

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?

Input schema coverage is 100%, so the schema already fully documents both parameters with descriptions. The tool description adds no additional meaning beyond the schema, thus the baseline of 3 is appropriate.

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 clearly states the tool rolls dice with a specified number of sides, using a specific verb and resource. It distinguishes itself from sibling randomization tools like random_integer or flip_coin, though it does not explicitly mention supporting multiple dice via the count parameter.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as random_integer or flip_coin. The description does not mention any context, prerequisites, or alternative tool exclusions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 13 tool updatesv0.1.0
    • First observedflip_coin
    • First observedhelp
    • First observedrandom_bytes
    • First observedrandom_choice
    • First observedrandom_float
    • First observedrandom_integer
    • First observedrandom_normal
    • First observedrandom_password
    • First observedrandom_sample
    • First observedrandom_shuffle
    • First observedrandom_uuid
    • First observedrandom_weighted_choice
    • First observedroll_dice

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, covering different random distributions, selection methods, and output types. While random_choice, random_sample, and random_weighted_choice all involve selecting from arrays, their behaviors are well-differentiated by descriptions and parameters.

Naming Consistency4/5

Most tools follow the random_ prefix pattern, but flip_coin, roll_dice, and help deviate. The deviations are intuitive and still readable, but the naming is not fully uniform.

Tool Count5/5

13 tools is well-scoped for a random utility server, covering common categories like number generation, selection, shuffling, bytes, UUIDs, and passwords without unnecessary overlap or bloat.

Completeness5/5

The tool set is comprehensive for its domain, including uniform and normal distributions, weighted and non-weighted selections, sampling, shuffling, byte generation, passwords, and simple helpers like coin flip and dice roll. No major gaps are evident.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Production-ready MCP server that provides LLMs with essential random generation abilities, including random integers, floats, choices, shuffling, and cryptographically secure tokens.
    7
    50
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An encrypted and secure random number generation server that complies with the MCP protocol, suitable for AI applications, LLMS, and other systems that require high-quality random numbers.
    7
    2
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that generates random numbers by using national weather data as entropy seeds. It provides a unique way to generate random values through weather API integration within the Model Context Protocol.
    Apache 2.0

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/MikeyBeez/mcp-random'

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