Skip to content

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.

  • A project containing allocation steps (allocation_split, allocation_rules, or allocation_dim).
  • An AI agent connected to your workspace over MCP — see Getting Started with AI Coding Agents.
Ask the agent …What it doesTool behind it
”What allocation models are in this project?”Lists each model, its stages, and the result tables it producesallocation_model_find
”How is cost_line_rev calculated?”Shows the cost pool being split, the driver it is split by, and the target tableallocation_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 accountsallocation_root_cause
”What feeds cost_line_rev?”Walks the upstream chain — drivers, source pools, and importsallocation_lineage
”Where is revenue_by_line used as a driver?”Lists every allocation that splits by that tableallocation_driver_usage
”What happens if US revenue rises by $1M?”Estimates the downstream impact on each affected result tableallocation_forward_impact

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_rev is 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 from revenue_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:

Account20252026Change
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_rev is built from revenue_by_line (the split driver) and gl_pool_entity (the cost pool).

Heads-up — that driver is shared. revenue_by_line also drives cost_line_cs and cost_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, and cost_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.

  • 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.