random_sample
Select k unique elements from a population without replacement using the Random Number MCP server. Ideal for generating unbiased, random subsets efficiently.
Instructions
Choose k unique items from population without replacement.
Args: population: List of items to choose from k: Number of items to choose
Returns: List of k unique chosen items
Input Schema
Name | Required | Description | Default |
---|---|---|---|
k | Yes | ||
population | Yes |
Input Schema (JSON Schema)
{
"properties": {
"k": {
"title": "K",
"type": "integer"
},
"population": {
"items": {},
"title": "Population",
"type": "array"
}
},
"required": [
"population",
"k"
],
"type": "object"
}