Skip to main content
Glama

Random Number MCP

by zazencodes
MIT License
2
  • Apple

random_choices

Select k items from a population with replacement, using optional weights for biased selection. Ideal for generating random samples from predefined item lists.

Instructions

Choose k items from population with replacement, optionally weighted.

Args: population: List of items to choose from k: Number of items to choose (default 1) weights: Optional weights for each item (default None for equal weights)

Returns: List of k chosen items

Input Schema

NameRequiredDescriptionDefault
kNo
populationYes
weightsNo

Input Schema (JSON Schema)

{ "properties": { "k": { "default": 1, "title": "K", "type": "integer" }, "population": { "items": {}, "title": "Population", "type": "array" }, "weights": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Weights" } }, "required": [ "population" ], "type": "object" }
Install Server

Other Tools from Random Number MCP

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/zazencodes/random-number-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server