# "Anthropic killed Tool calling"
<!--
ref: @content/youtube/ai-jason/anthropic-killed-tool-calling
tags: [tool calling, programmatic tool calling, tool search, dynamic filtering, MCP, context window efficiency, Anthropic API]
version: 2
updated_at: 2026-11-22T13:43:29.975Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=3wglqgskzjQ)**

# Anthropic killed Tool calling

*Synthesized from AI Jason, 2026-02-22; the speaker is not named in the source.*

A single presenter walks through Anthropic's newer tool-calling features for agent builders.

## Core Thesis
The presenter argues that classic JSON tool calling, unchanged for about 2 years, wastes tokens and invites errors on long multi-tool tasks, and that Anthropic's "tool calling 2.0" features fix this by letting the model write code, load tools on demand and see worked examples. He treats it as important for long-running, complex agents.

## Key Insights
- **The old loop.** The model gets tool definitions, returns a call such as a weather lookup for Paris, the server runs it and sends the result back for a final answer. Problems: the model must regenerate every parameter, intermediate results (for example long email-search metadata when only IDs are needed) fill the context, and passing a scraped page into a "write blog" tool means re-emitting the content. He notes the effective context window is roughly 128k to 200k even for 1M-token models.
- **Programmatic tool calling.** Based on the "executable code actions" idea and Cloudflare's code mode, the model writes code that calls tools, with loops, conditionals and filtering, so noisy intermediate output stays out of the context. He says it can cut 30 to 50% of token use and many round trips; best for large datasets, aggregation and deterministic sequences. His analogy for JSON tool calling is putting Shakespeare through a month-long class in Mandarin before asking for a play.
- **Enabling it.** Include the code execution tool in the request and give each tool an `allowed_callers` entry naming `code_execution_20260120`. The response contains the code plus tool-use blocks with a caller field; the runtime runs the matching function and returns results, then the model's code resumes.
- **Dynamic filtering for web fetch.** Using web fetch version `2026-02-09`, the model runs code to extract only relevant content from a page rather than all the HTML; Anthropic's testing showed about 24% average token reduction.
- **Tool search.** One search tool of about 500 tokens replaces loading hundreds of schemas, giving up to roughly 80% context savings. Mark tools `defer_loading: true`; for an MCP server, set a default config of deferred loading and override specific tools (his example, a search-events action) to stay always visible. Worth using with more than 10 tools or MCPs. He frames it as keeping MCP's typed schemas while avoiding the cost that pushes people toward skills plus CLI.
- **Tool use examples.** A tool definition can carry `input_examples`, which helps with ambiguous formats (a due date), field dependencies (SLA hours by escalation level) and nested or optional parameters. Anthropic's testing showed accuracy rising from 72% to 90% on complex parameter handling.

## Actionable Takeaways
1. Add the code execution tool and `allowed_callers` to existing tools to try programmatic calling without redesigning orchestration.
2. Switch web fetch to the 2026-02-09 version to filter pages before they reach context.
3. Defer-load rarely used tools and expose a tool search tool once you have more than 10 tools.
4. Add input examples to complex tools such as ticket creation.

## Notable Quotes
> "tool calling is the foundation of agents" — the presenter

> "you almost always want to optimize what goes into context window" — the presenter

---

*Related: `@content/youtube/yifan-bth/we-are-missing-the-point-of-mcp-its-not-just-about-tools` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/every-inc/microsofts-vision-for-an-internet-made-for-agents-with-cto-kevin-scott-best-of-the-pod` · `@content/youtube/tiago-forte/i-connected-my-entire-business-to-claude` · `@content/youtube/cole-medin/anthropic-just-dropped-a-masterclass-on-building-agent-harnesses-for-large-codebases`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*