Aggregated wallet balance across all entities

Aggregates wallet balances across all group entities into a consolidated view. Uses list_companies then get_wallet_summary for each entity.

↓ Download skill (.md)
86/100·📅 Weekly·IntermediateCFO
Multi-entityReportslist_companiesget_wallet_summary

🎯 Skill purpose

Aggregates wallet balances across all group entities into a consolidated view. Uses list_companies then get_wallet_summary for each entity.

📊 What it produces

Consolidated group wallet balance with detail per legal entity and currency.

Benefit

Before

Treasury check entity by entity — long and tedious to consolidate.

After

Consolidated group treasury view in a single Claude prompt, all entities aggregated.



# Aggregated wallet balance across multiple entities

## Prerequisite: org-level token

This workflow requires an **org-level token** (not company-scoped). With a company-scoped token, `list_companies` returns only the current entity with `name: null`.

## 2-step workflow

### Step 1 — List all entities

```json
{
  "tool": "list_companies",
  "params": {}
}
```

Returns the list of accessible entities: `{ id, name }` per entity.

Example (11 entities on this account):
```json
[
  { "id": "B1stUp83",      "name": "SPENDESK" },
  { "id": "Hx1N5m87M",    "name": "Spendesk Limited" },
  { "id": "RRbRgeIB7X",   "name": "Spendesk GmbH" },
  { "id": "pD0gYhOK75T",  "name": "Spendesk Inc." },
  ...
]
```

### Step 2 — Get the wallet for each entity

For each returned `companyId`:
```json
{
  "tool": "get_wallet_summary",
  "params": {
    "companyId": "<entity id>"
  }
}
```

## Pitfall: list_companies doesn't guarantee access to all entities

`list_companies` lists all entities **known** to the token, but `get_wallet_summary` can return `"Failed to verify user company membership"` for some of them if the token doesn't have full access rights.

→ Always handle errors for each individual call. Continue with the accessible entities, flag the inaccessible ones.

Example observed on this account: `pD0gYhOK75T` (Spendesk Inc.) → error, despite appearing in `list_companies`.

## Observed data

### SPENDESK (EUR, B1stUp83)
- `totalAmount`: **-511,590 EUR** (negative balance — allocations > balance)
- `currency`: EUR

### Spendesk Limited (GBP, Hx1N5m87M)
- `totalAmount`: 75,662 GBP
- `totalAvailableAmount`: 49,941 GBP
- `totalAllocatedAmount`: 25,720 GBP
  - subscription: 4,983 GBP
  - physical: 7,238 GBP
  - singlePurchase: 1,395 GBP

## Different currencies — DO NOT sum without conversion

Each entity has its own functional currency. To aggregate into a single currency (e.g. EUR), exchange rates must be applied — **not provided by the Spendesk MCP**. Conversion must be handled client-side.

→ For a consolidated view in EUR: present each entity in its own currency, or inject exchange rates from an external source.

## Structure of get_wallet_summary

```json
{
  "id": "companyId",
  "name": "Entity name",
  "status": "active",
  "currency": "EUR",
  "totalAmount": { "amount": -51159000, "currency": "EUR", "precision": 2 },
  "totalAvailableAmount": { "amount": ..., "currency": "EUR", "precision": 2 },
  "totalAllocatedAmount": { "amount": ..., "currency": "EUR", "precision": 2 },
  "allocatedOnCards": {
    "subscriptionAmount": { ... },
    "physicalAmount": { ... },
    "singlePurchaseAmount": { ... },
    "totalAllocatedAmount": { ... }
  },
  "scheduledTransfersAmount": {
    "scheduledExpenseClaimsAmount": { ... },
    "scheduledInvoicesAmount": { ... },
    "totalScheduledTransferAmount": { ... }
  }
}
```

`totalAmount` can be **negative** — this is a valid state when card allocations exceed the current balance (temporary overdraft pending top-up).

## Example user prompts

- "What's the available wallet balance for each entity in the group?"
- "Give me a consolidated view of Spendesk cash across all entities"
- "Which entities have a negative wallet balance?"

How to install this skill

/
  1. 1
    Download the file s42-wallet-multi-entites.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s42-wallet-multi-entites.md .claude/s42-wallet-multi-entites.md
  3. 3
    Use in Claude Codethe skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
💡 Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools list_companies, get_wallet_summary.

Similar skills

★ Top
95/100·🔍 Ad hoc·Expert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
★ Top
89/100·🔍 Ad hoc·Intermediate

Skill Builder

Aide un client à transformer un besoin métier précis (contexte, contraintes, format de sortie souhaité) en un nouveau skill Claude sur mesure, prêt à l'emploi sur le MCP Spendesk

CFOControllerAP Manager
★ Top
88/100·🔍 Ad hoc·Beginner

MCP Product Tour

Visite guidée conversationnelle du MCP Spendesk — appels réels sur les données de l'utilisateur, adaptée à sa persona, puis recommandation des prochains skills à installer

CFOControllerAP Manager