Generator Utilities

Shuffle List

Randomizes the order of list items using a deterministic shuffle algorithm. Call via MCP in Cursor or Windsurf, or hit GET /v1/generate/shuffle with your array. Perfect for randomizing test data, creating varied outputs, or shuffling deck orders. Uses Fisher-Yates algorithm for uniform distribution.

API Endpoint

GET /v1/generate/shuffle

Code Examples

curl "https://tinyfn.io/v1/generate/shuffle" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/generate/shuffle', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/generate/shuffle',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's generator tools:

{
  "mcpServers": {
    "tinyfn-generator": {
      "url": "https://tinyfn.io/mcp/generator",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I shuffle a list using MCP in Cursor?

Use the shuffle_list MCP tool with your array as input. It returns the same items in randomized order while preserving data types.

What shuffle algorithm does TinyFn use?

Fisher-Yates shuffle algorithm, which guarantees uniform random distribution where each permutation has equal probability.

Can I shuffle mixed data types in one list?

Yes, the tool preserves original data types - strings, numbers, objects, and booleans maintain their format after shuffling.

Does the shuffle work the same way every time with identical input?

No, each call produces a different random order. For reproducible shuffles, you'd need to implement seeded randomization separately.

What's the maximum list size I can shuffle?

The tool handles large arrays efficiently, though exact limits depend on your API plan and timeout settings.

Try Shuffle List Now

Get your free API key and start using Shuffle List in seconds.

Get Free API Key