◉CLAUDE LABJP
●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API●CC 2.1.330 — Claude Code 2.1.330 fixes the multi-minute freeze right after compacting a long conversation●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 8 days left. The suggested replacement is claude-sonnet-5-5●MCP 401 — Users report MCP servers that return 401 time out silently instead of showing an error●NEW — New: Desktop creates a worktree for every session? Three places to check●OPUS 4.5 — The 11/24 date for Opus 4.5 is a not-sooner-than floor, not a retirement notice●SCHEMA — Same schema, different shape: compare structured output from the Agent SDK and the Messages API
Articles/API & SDK
⬡ API & SDK/2026-03-19Advanced

Claude API Advanced Tool Use: Tool Search, Programmatic Tool Calling, and Tool Use Examples

A working walkthrough of Claude API's Tool Search Tool, Programmatic Tool Calling, and Tool Use Examples — starting with the beta header that everything depends on, plus how to read Anthropic's published reduction figures and when to skip each feature.

Claude API148tool use5function callingprogrammatic tool callingtool searchagents8production111

✦ Premium Article

Why Advanced Tool Use Matters

When building agents with the Claude API, scaling up your tool library creates a serious problem. Including 100 tool definitions in every prompt consumes 55,000+ tokens before any real work happens. Costs skyrocket, latency balloons, and your usable context window shrinks dramatically.

Anthropic shipped three tool use capabilities on November 24, 2025 that address exactly this:

  1. Tool Search Tool — Discover tools on demand, keeping their definitions out of the initial context
  2. Programmatic Tool Calling — Orchestrate multi-tool workflows in Python, keeping intermediate results out of context
  3. Tool Use Examples — Attach input examples to tool definitions, showing conventions a JSON schema can't express

All three are still in beta as of August 2026. The beta header is required, and without it defer_loading, allowed_callers, and input_examples are simply not accepted. That single line is where most people get stuck first.

Prerequisites: familiarity with basic Claude API tool use (beginner guide).


What Each Published Number Actually Measures

Write-ups of these three features tend to line up the same figures: 85%, 37%, and 72% to 90%. I read them the same way at first — as three flavors of "it gets faster." Then I built something with them, watched the part I expected to shrink stay exactly the same size, and went back to the source.

All three come from Anthropic's internal testing, published in Introducing advanced tool use on the Claude Developer Platform. What each one measures is not the same thing at all.

FigureFeatureWhat it actually measures
85% reductionTool Search ToolInitial context tokens. Roughly 77K tokens for 50+ MCP tools, down to about 8.7K
37% reductionProgrammatic Tool CallingTokens — 43,588 down to 27,297 on average, across complex research tasks
72% → 90%Tool Use ExamplesParameter accuracy on tools with complex nested inputs

The one that trips people up is 37%. That is a token reduction, not a latency reduction. What Anthropic actually says about Programmatic Tool Calling and latency is different: orchestrating 20+ tool calls inside one code block eliminates 19+ inference passes. Fewer round-trips does mean less wall-clock time, but reading it as "37% faster" is simply wrong.

I held that misreading long enough to sit there timing responses and wondering why nothing was 37% quicker. The tokens were the thing that had dropped, and they had dropped substantially. Measure the wrong quantity and you miss the improvement that's actually happening.

One more data point worth knowing: on MCP evaluations with Tool Search Tool enabled, Opus 4 went from 49% to 74%, and Opus 4.5 from 79.5% to 88.1%. Narrowing the candidate set doesn't just save tokens — it cuts down on picking the wrong tool. If your catalog has several similarly named tools, that effect is probably closer to what you'll feel day to day.

With all that said, these are numbers from Anthropic's test environment, and they depend heavily on how your catalog is shaped and what your agent does. Rather than borrowing the ratios, measure what your tool definitions currently cost you. Send one request with tools and one without, compare usage.input_tokens, and the gap is your ceiling.


✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦How to actually get defer_loading, allowed_callers, and input_examples accepted — and what the API returns when you forget the beta header
✦What Anthropic's 85%, 37%, and 72%-to-90% figures each measure, so you stop applying the wrong one to your own workload
✦Concrete conditions for when each of the three features pays off — and when adding it makes your agent slower
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-09-02
The 400 that rejects a thinking block, and finding the edit that caused it
On Claude Fable 5.1, editing the system prompt, tools, or earlier messages before a thinking block makes the request fail with a 400. Here is how to check whether your own agent loop does that in a single request, and how to move a rebuilt system prompt and client-side trimming to patterns that leave the prefix untouched.
⬡ API & SDK2026-05-24
Archiving Claude API Responses to Cloudflare R2: An Implementation Memo for Audit, Replay, and Incident Analysis
An implementation memo on persisting Claude API requests and responses into Cloudflare R2 so you can audit, replay, and triage production incidents — covering Workers waitUntil patterns, PII masking, and a D1 metadata index for fast lookups.
⬡ API & SDK2026-11-18
Before Your Customers Pay Through Linked Billing: Reading a 402 or 403 to Find Whose Wallet Is Empty
Linked billing, released in beta on November 17, lets you choose who pays on every Claude API request through billing_policy. When a request billed to a customer comes back as a 402 or 403, here is how I work out which wallet is the cause, when to pay for it myself, and a small Python wrapper that keeps that decision in one place.