get_donations_stats

Read-only

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.

json
{
  "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.

json
{
  "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

FieldTypeDescription
averageAmountnumberMean gift in CENTS; a float, not an integer.
bySourcearray of object
bySource[].amountintegerCENTS.
bySource[].countinteger
bySource[].sourcestring
byStatusarray of object
byStatus[].amountintegerCENTS.
byStatus[].countinteger
byStatus[].statusstring
currencystring
lastUpdatedstring (date-time)ISO-8601 timestamp of THIS response, not of the underlying data.
totalAmountintegerSum of every live donation but DISPUTED and REFUNDED ones, in CENTS.
totalCountinteger

When it fails

A failed call returns isError: true with the API's message as text.

403

Authenticated, 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.

json
{
  "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
  }
}