batch_batch_reduce
Reduce a batch of items using a folding function with an optional initial accumulator. Supports built-in reducers like sum, product, max, min, and concat.
Instructions
[batch] Fold items with fn(acc, item). initial=starting accumulator. Built-in reducers: sum/product/max/min/concat.
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": {
"items": "<items>",
"fn": "<fn>"
},
"name": "batch_batch_reduce"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| fn | Yes | ||
| initial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |