weighted_mean
Computes weighted arithmetic, geometric, and harmonic means from numeric values and optional weights, enabling accurate aggregated averages for uneven data.
Instructions
Compute weighted, arithmetic, geometric, and harmonic means of a set of values.
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": {
"values": "<values>"
},
"name": "weighted_mean"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Array of numeric values. | |
| weights | No | Optional weights (same length as values). |