Skip to main content
Glama

Random number

random_number
Read-only

One or more random whole numbers in a range (inclusive), optionally all different, from a cryptographic random source. Use for draws, sampling and games. Example: min=1. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
maxNoHighest value (default 100)
minNoLowest value (default 1)
countNoHow many (1-1000, default 1)
uniqueNotrue for no repeats

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / unique / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
  2. Added
  3. Removed
  4. Added

TDQS

A4/5.0
Behavior4/5

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

Adds real context beyond the annotations: a cryptographic source, inclusive bounds, a metered cost model ($0.01/call, first 25 free, failed calls free) and that repeats are billed again, which reinforces idempotentHint=false. The "reads or computes only and changes nothing" clause largely restates readOnlyHint, so it earns no extra credit.

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?

Purpose and range semantics are front-loaded in the opening clause, and the pricing sentence carries genuinely useful agent-facing information. The dangling "Example: min=1." is a truncated fragment that wastes a slot without illustrating anything.

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 four-parameter, all-optional, non-destructive compute tool with a fully described schema, this covers range semantics, uniqueness, randomness quality and cost. The only real gap is the shape of the return value when count > 1, which no output schema fills in.

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?

With 100% schema coverage the baseline is 3, and the description goes further by clarifying that ranges are inclusive and that `unique` means "all different" — details the schema does not spell out. It still does not describe what `count` returns (single value vs array).

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?

States a concrete verb and resource: generating one or more random whole numbers within an inclusive range, from a cryptographic source. The resource is clearly narrower than random_pick or random_shuffle, but siblings are never named, so the agent must infer the boundary itself.

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?

"Use for draws, sampling and games" gives a clear positive context for when this tool applies. It stops short of exclusions or pointing at alternatives like random_pick (list-based) or dice, which would have made routing unambiguous.

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.