# Wallet Portfolio Assistant

> Answer "what does wallet X hold on chain Y?" in one round trip.

- canonical: <https://ai.tatum.io/workflows/wallet-portfolio-assistant>

## MCP tools

- `get_wallet_portfolio`
- `get_tokens`
- `get_exchange_rate`

## API endpoints

- `GET /v4/data/wallet/portfolio`
- `GET /v4/data/wallet/tokens`

## Steps

1. Parse the user prompt for `address` and `chain`.
2. Validate the address shape for that chain.
3. Call `get_wallet_portfolio` (or the `Wallet API` endpoint).
4. Optionally enrich with `get_exchange_rate` to convert to a user-friendly quote currency.
5. Return a structured summary: native balance, top tokens by value, NFT count.

## Possible failures

- Unsupported chain for the address
- Address checksum invalid for the chain
- Token contract returns malformed metadata

## Recovery guidance

- Validate address against chain rules before calling
- Surface the chain support list from /api/chains when the chain is unknown
- Skip malformed tokens, never fail the whole portfolio call
