Skip to main content
Glama

Número al azar o sorteo de una lista

random-pick
Read-only

Genera enteros aleatorios en un rango inclusivo o elige n elementos de una lista, con o sin repetición; con semilla el resultado es reproducible. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: mezclar un arreglo (array-shuffle). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). No determinista: aleatorio salvo que se dé seed. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Draws random integers in an inclusive range, or picks n items from a list, with or without repetition, using secure randomness; with a seed the result is reproducible (HMAC-SHA256 stream). When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: shuffling an array (array-shuffle). Side effects: none (read-only, no network access, no stored state). Not deterministic: random unless seed is given. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
maxNoLargest integer (mode int) (integer; optional; default 100; min -9007199254740991; max 9007199254740991).
minNoSmallest integer (mode int) (integer; optional; default 1; min -9007199254740991; max 9007199254740991).
modeNoint: integers in [min, max]; items: pick from items (optional; one of: int, items; default "int").int
seedNoSeed for reproducible output (string; optional; up to 200 chars).
countNoHow many values or items (integer; optional; default 1; min 1; max 1000).
itemsNoItems to pick from (mode items) (array; optional).
uniqueNoWithout repetition (boolean; optional; default true).

Output Schema

NameRequiredDescriptionDefault
avisoNo
seededNo
valuesNoany JSON value
indicesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, non-open-world, non-destructive and non-idempotent, and the description usefully attributes the non-idempotency to seeding ('no determinista salvo que se dé seed') plus the HMAC-SHA256 stream and the 64 KB / 1 s / 1 MB limits. Those limits and the seed-reproducibility guarantee are real value beyond the structured fields, though 'sin red / sin estado' partly restates openWorldHint=false.

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?

The core behavior and limits are front-loaded and dense, which is good, but the off-topic 'transformar, comparar o revisar con exactitud' sentence earns nothing and misdirects. The full Spanish block plus a partial English block ending in '[EN completo / full EN: inputSchema.description]' bloats the definition with a pointer rather than content.

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?

An output schema exists, so return values need not be explained, and the description covers modes, seeding, determinism and hard limits — enough for a 7-parameter optional-only tool. Remaining gap is failure behavior (insufficient items for unique picks, items omitted in items mode) which would prevent a wasted call.

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 3 baseline holds; the description still adds meaning the schema lacks, notably that the integer range is inclusive and that repetition is governed by the unique flag when picking items. It does not explain what happens when unique is true and count exceeds the item list, which is the one edge case an agent would want.

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 precise verb+resource pair twice (generate inclusive-range integers / draw n items from a list), including the repetition flag and seed-reproducibility. It explicitly distinguishes itself from the sibling array-shuffle, so an agent can route without opening either schema.

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 exclusion is explicit and correct: 'No para: mezclar un arreglo (array-shuffle)'. But the positive 'Cuándo' clause — transforming/comparing/checking structured data exactly — reads as boilerplate from a different tool and does not describe when to draw random values, which actively misleads rather than guides.

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