mode
Calculates the most frequent value from a list of numbers, returning its frequency-based central tendency for statistical analysis.
Instructions
Computes the mode of a list of numbers.
Args: data: A list of numerical values.
Returns: On success: {"result": } On error: {"error": }
Examples: >>> mode([1, 2, 2, 3]) {'result': 2.0} >>> mode([1, 1, 2, 2]) {'result': 1.0} >>> mode([]) {'error': 'Cannot compute mode of empty array'}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data": "<data>"
},
"name": "mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |