title: "Code-Mode Tools Are Winning. MCP Became the Schema Layer."

date: 2026-10-04

tags: [mcp, code-mode, agent-harness, tool-calling, token-economics]


Code-Mode Tools Are Winning. MCP Became the Schema Layer.

A major harness vendor reversed its anti-MCP stance this week, and the reason matters more than the announcement. Tool interfaces are splitting into two tiers. One tier is code-mode tools, which an agent calls by writing and running code inside a sandbox. The other tier is tools the model only ever sees as schemas, described in the prompt but never actually invoked. The vendor flip is not a retreat from MCP. It is a confirmation that MCP already won one job and lost the other.

The Hacker News discussion of this reversal took 676 points and 362 comments. That volume tells you the developer community has been waiting for someone with distribution to say out loud what practitioners have been shipping quietly.

The root cause: text where data should be

Mainstream MCP servers still return prose. A search tool comes back with a formatted blob. A readfile tool comes back with a numbered code listing. A listdir tool returns a human-readable tree with commentary. Every one of those responses is fine for a person and expensive for a model. The model has to re-parse structure that the server already knew about and then threw away.

Code-mode tools invert this. Instead of calling a tool and receiving text, the agent writes a small program. That program calls the underlying API, loops over results, filters, joins, and formats only the fields worth keeping. The data stays structured the whole way through. The model reads the program's output instead of the API's raw text dump.

The difference is not elegance. It is arithmetic.

What deferred tool loading actually is

Deferred tool loading is the harness's answer to the other half of the problem: tool schemas are also expensive, and they are paid for on every single request even when the tool never gets used.

The mechanics look like this:

  • The full tool catalog lives outside the active context window.
  • The model receives a compact index: tool names, one-line descriptions, and the argument shapes that matter for routing.
  • When a decision requires a tool's full interface, the agent loads that one schema on demand.
  • Nothing is added to context until the model has committed to using the tool.

This turns a flat, always-on cost into a per-decision cost. An agent working on a code task that only needs read, edit, and exec never pays for the deploy pipeline tools, the observability tools, or the database migration tools.

Combine the two patterns and you get a harness with code execution plus lazy schema resolution. The model writes code, and the code only needs schemas for the tools it actually touches.

The token cost implications are not subtle

Consider a harness carrying 40 MCP tools with full JSON Schema definitions. At 400 tokens per schema, that is roughly 16,000 tokens of catalog sitting in front of every single request, on every turn, for the entire session. A 30-turn task burns about 480,000 tokens on tool definitions alone.

Deferred loading collapses that. A 40-tool catalog indexed down to name and description runs maybe 12 tokens per entry, so 500 tokens total. When the model picks one tool, that tool's full schema gets added, say 400 tokens, once. For a session that touches six tools, you land near 2,900 tokens of catalog overhead. That is a 99.4% reduction.

Code mode cuts the other side of the ledger. A text-returning tool that dumps 3,000 tokens of results lets the model call it once. The same data through a code-mode path lets the agent write a filter, run it, and pull back 200 tokens. Repetitive workloads compound this fast, because a loop in a sandbox costs one round trip while ten tool calls cost ten.

Stack them and the harness gets structurally cheaper on both edges: smaller prompts before work starts, smaller results after work happens. Neither trick requires a better model.

What the reversal tells you

Harness vendors spent 2024 and 2025 treating MCP as a compatibility tax, something to bolt on for users who demanded it. The reversal says something different. MCP servers are a supply of real-world capability and integrations, and the schemas are the most maintained, most discoverable description of that capability anywhere. Throwing that away means rebuilding thousands of integrations from scratch.

The vendor conclusion is that schemas are worth keeping, while tool invocation is worth replacing. MCP is an integration protocol and a capability catalog. Code mode is a better execution substrate. Those are different jobs, and only the first one is MCP's job.

The 362 comments in that thread split along predictable lines. People who run large tool catalogs argue deferred loading is now table stakes. People who build servers complain that the real fix belongs in the servers, not the harness. Both are right, and the second group has not shipped yet.

The Pi move: MCP from adapter to core

Pi moved MCP from a community adapter into core this week. That timing makes the argument concrete.

An adapter is a promise. Core is a supported surface. The move means MCP servers get the same loading path, schema handling, and permission model as built-in tools. It also means server authors get a stable contract inside the harness rather than a plugin that can drift or break on a version bump.

The practical effect on builders is a shorter path from "there is a server for this" to "an agent is using it." No adapter install, no plugin config, no separate namespace. If MCP is core, then an agent that can use tools can use MCP, and the code-mode versus schema-tier split becomes a harness implementation detail rather than an architectural decision you have to make.

What this means for agent builders

Treat your tool catalog as a budget, not a menu. Every tool you register is a tax on every turn.

Keep the catalog small and put breadth behind deferred loading. If a capability is rare, it belongs off the active index until the model asks for it by name.

Return data, not prose. If you own a server, change the response shape. Structured output is cheaper for the model to consume and cheaper for code mode to manipulate. Format once, in the harness, not on every call.

Write your own glue. When a workflow needs three calls plus a filter, ship one code-mode entry point that does all four. The agent writes the loop instead of narrating it.

Watch the seam. Code-mode tools and schema tools will coexist in every harness you build on. Decide explicitly which tier a capability belongs in, because a capability split across both tiers pays twice.

Practical takeaways

  1. Count your tokens before you tune anything. Sum the schemas in your active prompt. Multiply by turns. That number is your real catalog bill.
  2. Move every tool you can behind deferred loading this week. Tools nobody calls cost you on every request forever.
  3. Audit your server responses this month. Every sentence of prose in a tool result is tokens the model pays to re-parse. Replace it with fields.
  4. Wrap multi-call workflows in single code-mode functions. Ten round trips become one.
  5. Test your harness with the tool catalog trimmed by half. If accuracy holds, the other half was never earning its place.
  6. If you ship a server, follow Pi's move and treat code mode as a first-class consumption path. Your users are going to call your capability from generated code, not just from a schema.
  7. Track the code-mode versus schema split in your own stack. As this settles, the split becomes a portability problem. Build so you can move an entry from one tier to the other without rewriting the capability.