Decompose what changed in the user's portfolio over a time window — the AI version of an account statement. Returns the top-level USD change, broken down by chain and per-asset into: price moves (USD impact of price change on what was held the entire window), net deposits / withdrawals (sum of pr...
AI agents call get_portfolio_diff to retrieve information from VaultPilot MCP without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | — | "structured" returns the JSON envelope only. "narrative" returns only the pre-rendered string. "both" (default) returns both — agents typically use the narrativ |
wallet | string | — | EVM wallet (Ethereum / Arbitrum / Polygon / Base / Optimism). Used to fetch current balances and walk EVM tx history for the window. |
window | string | — | Time window for the diff. "24h" / "7d" / "30d" are rolling; "ytd" is calendar-year-to-date (UTC). For periods longer than 30d the underlying history fetcher's p |
tronAddress | string | — | TRON mainnet base58 address (T-prefix). Folds TRX + TRC-20 balances and TRON history into the diff. |
solanaAddress | string | — | Solana mainnet base58 pubkey. Folds SOL + SPL balances and Solana history into the diff. |
bitcoinAddress | string | — | Bitcoin address (any type). Folds BTC balance + history. Only one BTC address per call in v1. |
Parameters from the server's own tool schema.
Even though get_portfolio_diff only reads data, uncontrolled read access leaks sensitive information and racks up API costs — an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
Decompose what changed in the user's portfolio over a time window — the AI version of an account statement. Returns the top-level USD change, broken down by chain and per-asset into: price moves (USD impact of price change on what was held the entire window), net deposits / withdrawals (sum of priced external transfers), and 'other' (the residual — interest accrual, swap legs, MEV, anything not cleanly attributable to price or external flow). Supports wallet (EVM), tronAddress, solanaAddress, bitcoinAddress — at least one required. Window: 24h / 7d / 30d / ytd. Returns BOTH a structured envelope AND a pre-rendered narrative string suitable for verbatim relay (control via format). Distinct from get_portfolio_summary (which gives current state) and get_pnl_summary (which gives the single net-PnL number) — this tool gives narrative decomposition. v1 caveats: history fetcher caps at ~50 items per chain, so very active wallets may under-count flows (response surfaces truncated: true); DeFi-position interest accrual collapses into the otherEffectUsd residual rather than its own bucket; Solana program-interaction txs (Jupiter swaps, MarginFi actions, etc.) are skipped from net-flow accounting (their balance deltas mix swap legs); Bitcoin shows current balance only (no in-window flow accounting yet). It is categorised as a Read tool in the VaultPilot MCP MCP Server, which means it retrieves data without modifying state.
get_portfolio_diff accepts 6 parameters: format, wallet, window, tronAddress, solanaAddress, bitcoinAddress. The full parameter table on this page comes from the server's own tool schema.
Register the VaultPilot MCP server in PolicyLayer and add a rule for get_portfolio_diff: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches VaultPilot MCP. Nothing to install.
get_portfolio_diff is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_portfolio_diff rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_portfolio_diff. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_portfolio_diff is provided by the VaultPilot MCP server (vaultpilot-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.