metered-price
Tiered usage pricing: graduated or volume tiers, included quantity, package units, minimum charge — Prices a usage quantity against up to 50 tiers, graduated (each tier prices only its own units) or volume (the tier holding the whole quantity prices all of it), for an agent checking a usage bill or quoting a plan. Order of operations: subtract the included quantity, convert to billing packages (per N units, rounded up, down or not at all), price the tiers, add flat fees, apply the minimum charge
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": {
"quantity": "<quantity>",
"mode": "<mode>",
"tiers": "<tiers>"
},
"name": "metered-price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| per | No | Units per billing package (default 1). Tiers are expressed in packages. | |
| mode | Yes | ||
| tiers | Yes | ||
| minimum | No | Minimum charge in major units, applied after the tiers. | |
| currency | No | ISO 4217 alphabetic code, upper case. | |
| exponent | No | ||
| included | No | Free quantity subtracted before packaging and tiers (never below zero). | |
| quantity | Yes | Decimal string such as "-12.50" (up to 15 integer and 12 fraction digits). JSON numbers are not accepted: they are binary floats. | |
| rounding | No | Final rounding to the minor unit. Default half-up. half-up: ties away from zero. half-down: ties toward zero. half-even: ties to the even neighbour. up: away from zero. down: toward zero. ceiling: toward +infinity. floor: toward -infinity. | |
| packageRounding | No | How a partial package is billed when per > 1. Default up. |