Combinations Calculator
combinationsCompute the number of distinct combinations, n choose r, using a multiplicative form that avoids factorial overflow.
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": {
"n": "<n>",
"r": "<r>"
},
"name": "combinations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Total items, at least 1 | |
| r | Yes | Items chosen, between 0 and n |