get_claims_recent
Calls GET /api/claims/recent as the signed-in person · REST reference
The 20 most recent claims
Vouchers in a claim-related state (PERFORMED_PENDING_CLAIM, CLAIMED, APPROVED, QUEUED_FOR_CHECKOUT, PAID), newest first. Fixed at 20 — it takes no query parameters, so GET /api/claims?limit=20 is the configurable equivalent. ORG-SCOPED, like GET /api/vouchers: a caller sees the claims on vouchers assigned to or claimed by an org in which it holds a voucher feature (hospital.vouchers.transition, .redeem, .request, hospital.reports.view or distributor.reports.generate) — the DAL bounds the read from the caller's own forwarded token. Platform staff see every org's. A caller holding none of them anywhere — an org's read-only member — is refused 403. The projection omits the beneficiary email. The read window: the service asks the DAL for the newest 200 of the caller's VOUCHERS in any state and then filters those to claim states in process, so a busy period of non-claim vouchers can push real claims out of the result entirely.
Arguments
This tool takes no arguments.
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_claims_recent",
"arguments": {}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
A bare array of claim rows, newest first.
[
{
"amount": 1,
"currency": "string",
"id": "11111111-1111-4111-8111-111111111111",
"status": "string",
"voucherCode": "string",
"voucherId": "11111111-1111-4111-8111-111111111111",
"claimedAt": 1,
"claimedByOrgId": "11111111-1111-4111-8111-111111111111",
"procedure": "string",
"workOrderId": "string"
}
]Fields
| Field | Type | Description |
|---|---|---|
[].amount | integer | null | The value of the voucher's claim in CENTS — the only money a voucher is shown as worth, derived by the backend (claimAmount, backend/src/domain/claimInvoice.ts), not a DAL field. Null until the claim is submitted, and while a CLAIMED voucher's invoice waits on the AI or a reviewer; a CLAIMED voucher's validated covered amount, capped as approval caps it; from APPROVED on, what approval credited (creditedAmount). Never the face value (value). |
[].claimedAt | integer | string | Epoch milliseconds, or an ISO string on rows written before the scalar. |
[].claimedByOrgId | string (uuid) | |
[].currency | string | |
[].id | string (uuid) | The voucher id. |
[].procedure | string | |
[].status | string | The voucher state. |
[].voucherCode | string | |
[].voucherId | string (uuid) | |
[].workOrderId | string |
When it fails
A failed call returns isError: true with the API's message as text.
403The caller holds no voucher feature in any organization.
404The DAL's refusal said "not found".
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_claims_recent",
"description": "GET /api/claims/recent — Vouchers in a claim-related state (PERFORMED_PENDING_CLAIM, CLAIMED, APPROVED, QUEUED_FOR_CHECKOUT, PAID), newest first. Fixed at 20 — it takes no query parameters, so `GET /api/claims?limit=20` is the configurable equivalent. ORG-SCOPED, like `GET /api/vouchers`: a caller sees the claims on vouchers assigned to or claimed by an org in which it holds a voucher feature (`hospital.vouchers.transition`, `.redeem`, `.request`, `hospital.reports.view` or `distributor.reports.generate`) — the DAL bounds the read from the caller's own forwarded token. Platform staff see every org's. A caller holding none of them anywhere — an org's read-only member — is refused 403. The projection omits the beneficiary email. The read window: the service asks the DAL for the newest 200 of the caller's VOUCHERS in any state and then filters those to claim states in process, so a busy period of non-claim vouchers can push real claims out of the result entirely.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}