Tracing Allocations with an MCP-Connected AI Agent
Once you’ve connected an AI agent to your workspace over the Model Context Protocol (MCP), you can ask it — in plain language — to trace cost through your allocation steps. You don’t run a report or write SQL: you ask a question, and the agent calls PlaidCloud’s allocation-tracing tools to find the model, explain a change, walk the chain, and answer what-if questions.
This works from any MCP-connected client — a chat agent (Claude Desktop, ChatGPT) or a coding agent (Claude Code, Cursor) — since they all reach the same tools over the MCP server.
Prerequisites
Section titled “Prerequisites”- A project containing allocation steps (
allocation_split,allocation_rules, orallocation_dim). - An AI agent connected to your workspace over MCP — see Getting Started with AI Coding Agents.
What You Can Ask
Section titled “What You Can Ask”| Ask the agent … | What it does | Tool behind it |
|---|---|---|
| ”What allocation models are in this project?” | Lists each model, its stages, and the result tables it produces | allocation_model_find |
”How is cost_line_rev calculated?” | Shows the cost pool being split, the driver it is split by, and the target table | allocation_describe |
”Why did cost_line_rev change from 2025 to 2026?” | Compares the two periods and attributes the change to the pool size versus the driver mix, with the top contributing accounts | allocation_root_cause |
”What feeds cost_line_rev?” | Walks the upstream chain — drivers, source pools, and imports | allocation_lineage |
”Where is revenue_by_line used as a driver?” | Lists every allocation that splits by that table | allocation_driver_usage |
| ”What happens if US revenue rises by $1M?” | Estimates the downstream impact on each affected result table | allocation_forward_impact |
Worked Example
Section titled “Worked Example”A finance analyst notices a revenue-driven cost line has fallen year on year and asks one question. The agent answers it end to end, calling several allocation tools behind the scenes.
You ask: Our revenue-based cost allocation (
cost_line_rev) looks down in 2026 versus 2025. What happened, what is it built from, and what would a +$1M US revenue swing do?
The agent replies:
What it is.
cost_line_revis the revenue-driven stage of your Activity-Based Costing (ABC) model. It takes a cost pool (group_amount, limited to a set of P&L accounts) and splits it by revenue fromrevenue_by_line, weighted within each entity, year, and month.Why it dropped (US, 2025 → 2026). US-allocated cost fell from $7.12M to $2.99M — a $4.13M drop (−58.0%). This is not a mix shift: the US share of the pool held steady at about 23% in both years. The driver is the total cost pool shrinking, concentrated in a few accounts:
Account 2025 2026 Change 700000 $2.58M $1.09M −$1.49M 701000 $1.85M $0.77M −$1.08M 610000 $1.71M $0.72M −$0.99M 670000 $0.68M $0.29M −$0.39M 702000 $0.30M $0.13M −$0.18M Those five accounts explain essentially all of the move.
What feeds it.
cost_line_revis built fromrevenue_by_line(the split driver) andgl_pool_entity(the cost pool).Heads-up — that driver is shared.
revenue_by_linealso drivescost_line_csandcost_line_admin, so a revenue restatement ripples into all three.Your +$1M US scenario. A $1M US revenue increase could shift allocated cost by up to $1M in each of
cost_line_rev,cost_line_cs, andcost_line_admin— three affected results, each an independent upper bound rather than a shared total.
The analyst gets a complete answer — the size of the change, the accounts behind it, the lineage, and the blast radius of a what-if — without opening a single table.
Good to Know
Section titled “Good to Know”- Refer to tables by their name (
cost_line_rev) or their id — both work. - For a change question, name the periods to compare (for example 2025 versus 2026) and, where useful, a breakdown dimension such as account or entity.
- Start broad (“what allocation models are in this project?”) and drill in; the agent keeps the thread, so follow-up questions build on the same model.
Related
Section titled “Related”- Getting Started with AI Coding Agents — connect an agent to your workspace over MCP
- Why Allocations Are Useful — allocation concepts
- Troubleshooting — connection and authentication issues