Skip to main content
Glama

Secure random numbers in a range, or a random pick from a list

random_number
Read-only

Cryptographically secure, unbiased randomness: whole numbers between min and max (default 1 to 100), or random picks from a list of choices, one or up to 100 per call. Useful because language models are bad at being random: fair draws, sampling, shuffling decisions, and A/B assignment. Not charged for invalid options. Paid via x402; see list_prices.

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": "random_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoHighest value (default 100).
minNoLowest value (default 1).
countNoHow many, 1 to 100 (default 1).
choicesNoOptional list to pick from instead of a number range.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / choices / items / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 512,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "items": {
      -      "anyOf": [
      -        {
      -          "maxLength": 512,
      -          "type": "string"
      -        },
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "boolean"
      -        }
      -      ]
      -    },
      -    "maxItems": 200,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maxLength": 512,
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        }
      +      ]
      +    },
      +    "maxItems": 200,
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / choices / items / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 512,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maxLength": 512,
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        }
      +      ]
      +    },
      +    "maxItems": 200,
      +    "type": "array"
      +  }
      +]
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered; the description adds useful beyond-schema behavior: cryptographic security/unbiasedness, the 1-100 count ceiling, that invalid options aren't charged, and that calls are paid via x402 with list_prices as the pricing reference. It doesn't state the exact return shape (scalar vs array), which keeps it from a 5.

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?

Three dense sentences, front-loaded with the tool's nature before use cases and pricing. Every clause carries information, though the 'language models are bad at being random' aside is slightly promotional rather than operational.

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?

With no output schema, the description must carry return semantics; it implies a scalar for count=1 and a set up to 100 otherwise but doesn't state the exact format. It covers both modes, defaults, limits, pricing, and error-charging behavior, making it nearly complete for a 4-param tool with full schema coverage.

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 description coverage is 100% and each param carries its own description with defaults, so the baseline is 3. The description adds the key relational semantics the schema doesn't convey: that choices is an alternative to the min/max range, and that count applies per call up to 100.

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 states a specific verb+resource ('Cryptographically secure, unbiased randomness') and enumerates the two modes it supports: whole numbers between min and max, or random picks from a list. An agent can distinguish it from new_uuid or other sibling generators because it names randomness range/list semantics explicitly.

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 names concrete use cases (fair draws, sampling, shuffling decisions, A/B assignment) and states the rationale ('language models are bad at being random'), which gives clear usage context. It does not name an alternative sibling tool or state when-not-to-use, so it falls short of explicit routing guidance.

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