数组随机采样器
从数组中随机选择指定数量的元素,支持不同的采样方法
API 文档
请求端点
POST /zh/api/tools/array-random-sampler
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| arrayInput | textarea | 是 | - |
| delimiter | select | 是 | - |
| customDelimiter | text | 否 | - |
| sampleSize | number | 否 | - |
| samplingMethod | select | 是 | - |
| seed | number | 否 | - |
| allowDuplicates | checkbox | 否 | - |
| preserveOrder | checkbox | 否 | - |
| outputFormat | select | 是 | - |
响应格式
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
文本:
文本
AI MCP 文档
将此工具添加到您的 MCP 服务器配置中:
{
"mcpServers": {
"elysiatools-array-random-sampler": {
"name": "array-random-sampler",
"description": "从数组中随机选择指定数量的元素,支持不同的采样方法",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=array-random-sampler",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。
如果遇见问题,请联系我们:[email protected]