This Anthropic MCP paper is f*cking gold
Anthropic's engineers cut an agent's tool context from 150,000 tokens to 2,000. Same tools, same task. And the model wasn't the upgrade.
The upgrade: the agent stops calling tools and starts writing code that calls them.
tools → files → code → filter → answer
The 6 parts of code mode:
Part 1 → tools as files
Every MCP tool becomes a .ts file in ./servers. The agent lists the folder and opens only what it needs.
Part 2 → load on demand
150,000 tokens of tool definitions down to 2,000. A 98.7% saving in time and cost.
Part 3 → filter in code
A 10,000-row sheet gets filtered in the sandbox. The model sees 5 rows.
Part 4 → loops in code
Polling Slack for "deployment complete" runs as a while loop. No round trip through the model on every check.
Part 5 → private by default
Emails and phones turn into [EMAIL_1] and [PHONE_1] before the model sees them. The real data still lands in Salesforce.
Part 6 → skills
Working code gets saved to ./skills with a SKILL.md. The agent builds its own toolbox.
An agent that loads every tool burns its context before you ask anything. An agent that writes code opens 2 files.
I packed all 6 parts into one prompt. Drop it into Claude Code and it sets code mode up for you.
6 parts. 1 prompt. 98.7% fewer tokens.
Then read the enhanced edition of agent engineering below ↓
Your agent passed every test
The issue is still open
A better prompt won't fix it, because the model isn't the broken part
I broke down the harness, loop and graph around it: what each one owns, how they nest, and which one to fix first ↓ x.com/i/article/2118252167026864128
