Skip to main content
Glama

Random number

random_number

Use when an agent needs numbers in a range that will stand up to inspection: uniform random integers between your own bounds, with or without repeats, drawn with rejection sampling so the ends of the range are not slightly less likely, which is what modulo does. Do not use to choose among items (/v1/random/pick) or for a secret (/v1/random/password). $0.005 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
maxNoHighest value, inclusive. Defaults to 100.
minNoLowest value, inclusive. Defaults to 1.
countNoHow many to draw, 1-100. Defaults to 1.
uniqueNoNo repeats. Needs a range at least as wide as count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are supplied, so the description must carry the load, and it goes well beyond the schema by naming the sampling algorithm and the bias guarantee. The repeated range check when unique=true constrains misuse. It stops short of covering edge cases (count exceeding range width), response shape, or being a fake-data source.

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 sentences: use case, exclusions, cost. Front-loaded and waste-free. The first sentence is long and carries several facts, so parsing is slightly dense compared to the rest of the document.

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 annotations or output schema, the description must supply routing, algorithm, and cost. It does all three. What is missing is return format (scalar vs list when count > 1) and error behavior when unique=true and count exceeds the range width.

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, and the description earns more: it foregrounds 'with or without repeats' (the unique flag) and states the range-width requirement when repeats are excluded. It does not explain count semantics or the min/max relationship explicitly in the description.

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 concrete verb and resource ('uniform random integers between your own bounds, with or without repeats') and distinguishes itself from random_pick and random_password. An agent knows exactly what this produces without opening the schema.

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

Usage Guidelines5/5

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

Explicit positive condition ('use when an agent needs numbers in a range') and explicit negative routing to two named siblings for picking items and for secrets. That is the full when/when-not/alternative triad.

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