Code execution with MCP: Building more efficient agents

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Anthropic's proposal could cut token use and errors in MCP agents, but with no code released it changes nothing for practitioners today.

Read this as

Anthropic published an essay proposing a way to make AI assistants that use tools work more efficiently. Instead of loading every tool's description into the AI's limited memory, tools would be saved as regular code files the AI reads only when needed, and the AI would chain tools together by writing code rather than relaying every response through its own memory. Simon Willison, a well-known AI commentator, praises the idea but notes Anthropic provided no working code, only a description.

Anthropic proposes converting MCP tools into TypeScript files on disk that agents discover and compose as code, cutting token overhead and removing the model from every intermediate step, faster, cheaper, and keeping sensitive data like document contents out of the model's context. Simon Willison calls the approach sensible, matching his own move away from MCP toward CLI tools. The catch: no implementation ships with the essay, so there is nothing to adopt today.

Anthropic proposes rendering MCP tools as typed TypeScript functions on disk (e.g. getDocument.ts wrapping a callMCPTool invocation), discovered by the agent via filesystem navigation rather than consuming context with tool schemas. Chained calls, such as passing a Google Drive transcript into a Salesforce updateRecord, execute in code, avoiding round-tripping responses through the LLM. Benefits cited: fewer tokens, fewer model-introduced mistakes, less sensitive-data exposure. No reference implementation is provided; Willison endorses the design but notes execution is left to readers.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Anthropic Simon Willison MCP Claude Skills Google Drive Salesforce Playwright

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading