Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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-1000, default 1)
uniqueNotrue for no repeats

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / count / maximum
      Previous value: -9007199254740991New value: +1000
    • changedInput schema / properties / count / minimum
      Previous value: --9007199254740991New value: +1
    • changedInput schema / properties / max / maximum
      Previous value: -9007199254740991New value: +1000000000000
    • changedInput schema / properties / max / minimum
      Previous value: --9007199254740991New value: +-1000000000000
    • changedInput schema / properties / min / maximum
      Previous value: -9007199254740991New value: +1000000000000
    • changedInput schema / properties / min / minimum
      Previous value: --9007199254740991New value: +-1000000000000
  2. Changed1 schema field changed
    • changedInput schema / properties / unique / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover readOnly/openWorld/destructive/idempotent, but the description adds genuinely non-derivable behavior: cryptographic source, per-call billing ($0.01 via x402 USDC or card key), first 10 free, failed calls free, and the practical consequence that repeats are not free. The 'changes nothing' clause largely restates readOnlyHint, 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.

Conciseness3/5

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

Purpose and usage are correctly front-loaded, and the billing disclosure is worth including. However, 'Example: min=1.' is dead weight, and the pricing/cloning details are crammed into the same run-on sentence as the read-only claim rather than separated.

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?

Covers source, safety profile, uniqueness semantics, pricing, and defaults for a 4-parameter tool with no output schema. The remaining gap is return shape: with no output schema, the description never says whether count=1 yields a scalar or a one-element array, which matters for parsing.

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 the baseline is 3; the description still adds meaning by stating bounds are inclusive and that uniqueness is optional ('optionally all different'), which the schema's terse 'true for no repeats' does not fully spell out. The 'Example: min=1.' fragment adds nothing and slightly weakens the section.

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?

States a specific verb and resource ('random whole numbers in a range (inclusive), optionally all different'), plus the source (cryptographic RNG). An agent can immediately tell this generates numbers in a range rather than picking from a supplied list (random_pick) or reordering one (random_shuffle).

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 use context. It stops short of exclusions or naming an alternative when the pool of candidates is already known (e.g., use random_pick instead), so it does not reach a 5.

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