get_vouchers_batches_capacity
Calls GET /api/vouchers/batches/capacity as the signed-in person · REST reference
Who may hold a new voucher batch, and the most vouchers each can be minted
Sizes a batch before it is created. Lists every organization that may hold a voucher batch — each DISTRIBUTOR and the platform organization, never a service provider — with maxQuantity, the most vouchers POST /api/vouchers/batches will mint for it right now: the smaller of its unspent allocation and the voucher pool's uncommitted money (poolBalance − committed), in whole vouchers of unitValue, capped at maxBatchQuantity. Those are the two guards the mint itself runs, so a quantity up to maxQuantity is affordable when read; a concurrent batch can still spend it first. Organizations whose allocation cannot fund one voucher are listed with maxQuantity: 0. All money is integer CENTS. The caller's own bearer token is forwarded to the DAL.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
currencyquery | string | Applied only when sent as a string; anything else falls back to USD. |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_vouchers_batches_capacity",
"arguments": {}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The batch holders and what each can be minted.
{
"currency": "string",
"holders": [
{
"allocation": 1,
"maxQuantity": 1,
"orgId": "11111111-1111-4111-8111-111111111111",
"orgName": "string",
"orgType": "string"
}
],
"maxBatchQuantity": 1,
"poolAvailable": 1,
"unitValue": 1
}Fields
| Field | Type | Description |
|---|---|---|
currency | string | |
holders | array of object | |
holders[].allocation | integer | Unspent allocation, in CENTS. |
holders[].maxQuantity | integer | Most vouchers one batch for this organization may mint now. |
holders[].orgId | string (uuid) | |
holders[].orgName | string | |
holders[].orgType | string | null | |
maxBatchQuantity | integer | The ceiling on any one batch, whatever the budget. |
poolAvailable | integer | Voucher-pool money not yet committed to a voucher, in CENTS. |
unitValue | integer | Face value of one voucher in a batch that names no procedure, in CENTS. |
When it fails
A failed call returns isError: true with the API's message as text.
403Authenticated, but the caller holds none of the required permissions.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "get_vouchers_batches_capacity",
"description": "GET /api/vouchers/batches/capacity — Sizes a batch before it is created. Lists every organization that may hold a voucher batch — each DISTRIBUTOR and the platform organization, never a service provider — with `maxQuantity`, the most vouchers `POST /api/vouchers/batches` will mint for it right now: the smaller of its unspent allocation and the voucher pool's uncommitted money (`poolBalance − committed`), in whole vouchers of `unitValue`, capped at `maxBatchQuantity`. Those are the two guards the mint itself runs, so a quantity up to `maxQuantity` is affordable when read; a concurrent batch can still spend it first. Organizations whose allocation cannot fund one voucher are listed with `maxQuantity: 0`. All money is integer CENTS. The caller's own bearer token is forwarded to the DAL.",
"inputSchema": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"description": "Applied only when sent as a string; anything else falls back to USD."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}