Skip to main content
Glama

Shuffle a list

random_shuffle

Use when an agent must put a list in an order nobody can claim was arranged: a uniformly random shuffle with Fisher-Yates over the platform CSPRNG, so every permutation is equally likely, which sorting by a random key does not give you. Do not use to take just one or a few items (/v1/random/pick). No API key, no account. $0.005 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
itemsYesThe list to shuffle, comma-separated. A JSON array of strings is also accepted in a POST body.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / items / description
      Previous value: -"The list to shuffle. In a GET, comma-separated."New value: +"The list to shuffle, comma-separated. A JSON array of strings is also accepted in a POST body."
    • changedInput schema / properties / items / type
      Previous value: -"array"New value: +"string"
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations to lean on, the description still discloses the important non-obvious traits: the algorithm and its uniformity guarantee, that no API key or account is needed, and the exact cost ($0.005/call via x402 USDC). It does not cover rate limits, failure modes, or what happens with duplicate items, which keeps it below 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?

Front-loaded with the usage trigger and only three sentences total, each carrying a distinct payload (purpose/guarantee, exclusion, pricing/auth). The first sentence is dense and slightly run-on, but no sentence is filler.

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 single-parameter tool with no output schema, the description covers the things an agent most needs before calling: the correctness guarantee, the alternative, and the payment/auth model. Return shape (presumably the reordered list) and edge-case behavior are left implicit, a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter already documents comma-separated vs JSON array input. The description adds nothing about the items parameter, so the baseline of 3 for a fully documented schema applies.

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 (shuffle a list) and immediately qualifies the guarantee: uniformly random, Fisher-Yates over the platform CSPRNG. It explicitly names the sibling it is not (/v1/random/pick), so an agent can distinguish it from random_pick 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 Guidelines5/5

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

Gives an explicit when ('an order nobody can claim was arranged') and an explicit when-not with the alternative named ('Do not use to take just one or a few items (/v1/random/pick)'). It even explains why a naive approach (sorting by a random key) is not a substitute.

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