get_donations_stats
Calls GET /api/donations/stats as the signed-in person · REST reference
Platform-wide donation aggregates
Unscoped totals across EVERY organization - there is no org-scoped variant, which is why the gate is platform staff rather than a per-org permission. Deleted, DISPUTED and REFUNDED donations are excluded from every figure, byStatus included. The handler re-projects the DAL's donationStats and drops two fields the DAL returns (voucherPoolTotal and operationsTotal), so this endpoint cannot answer "how much of the money went to the pool"; /api/finance/metrics is where that lives. lastUpdated is the time this response was generated, not the time the aggregate last changed.
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_donations_stats",
"arguments": {}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
Donation aggregates.
{
"averageAmount": 1,
"bySource": [
{
"amount": 1,
"count": 1,
"source": "string"
}
],
"byStatus": [
{
"amount": 1,
"count": 1,
"status": "string"
}
],
"currency": "string",
"lastUpdated": "2026-01-15T12:00:00Z",
"totalAmount": 1,
"totalCount": 1
}Fields
| Field | Type | Description |
|---|---|---|
averageAmount | number | Mean gift in CENTS; a float, not an integer. |
bySource | array of object | |
bySource[].amount | integer | CENTS. |
bySource[].count | integer | |
bySource[].source | string | |
byStatus | array of object | |
byStatus[].amount | integer | CENTS. |
byStatus[].count | integer | |
byStatus[].status | string | |
currency | string | |
lastUpdated | string (date-time) | ISO-8601 timestamp of THIS response, not of the underlying data. |
totalAmount | integer | Sum of every live donation but DISPUTED and REFUNDED ones, in CENTS. |
totalCount | integer |
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_donations_stats",
"description": "GET /api/donations/stats — Unscoped totals across EVERY organization - there is no org-scoped variant, which is why the gate is platform staff rather than a per-org permission. Deleted, DISPUTED and REFUNDED donations are excluded from every figure, `byStatus` included. The handler re-projects the DAL's donationStats and drops two fields the DAL returns (voucherPoolTotal and operationsTotal), so this endpoint cannot answer \"how much of the money went to the pool\"; /api/finance/metrics is where that lives. `lastUpdated` is the time this response was generated, not the time the aggregate last changed.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}