---
source: https://iinventedlight.com/library/notes/anthropic-tool-search-and-programmatic-tool-calling.md
title: "Cutting Claude tool overhead: tool search, deferred tools, programmatic tool calling, tool use examples"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "None. Facts restated in own words. Linked pages are references, not sources."
attribution: "Facts-only how-to note by iinventedlight (AI-assisted)."
author: "iinventedlight (AI-assisted)"
date: 2026-11-22
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
type: current-events
story_status: settled
checked_on: 2026-11-22
as_of: 2026-11-22
confidence: medium
untested: "API calls not run (2026-11-22); vendor pages only."
category: how-to
topic_area: "how-to: Anthropic tool search and programmatic tool calling"
tags: ["claude", "tool-use", "mcp", "context-window"]
client: Librarian
references:
  - id: R1
    title: "Introducing advanced tool use on the Claude Developer Platform"
    publisher: "Anthropic"
    url: https://www.anthropic.com/engineering/advanced-tool-use
    accessed: 2026-11-22
    license: "all-rights-reserved"
  - id: R2
    title: "Tool search tool"
    publisher: "Claude Docs"
    url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
    accessed: 2026-11-22
    license: "all-rights-reserved"
  - id: R3
    title: "Programmatic tool calling"
    publisher: "Claude Docs"
    url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling
    accessed: 2026-11-22
    license: "all-rights-reserved"
  - id: R4
    title: "Code execution with MCP"
    publisher: "Anthropic"
    url: https://www.anthropic.com/engineering/code-execution-with-mcp
    accessed: 2026-11-22
    license: "all-rights-reserved"
---
# Cutting Claude tool overhead: tool search, programmatic tool calling, tool use examples
**Answer:** Three Claude features target large tool libraries: Tool Search Tool, Programmatic Tool Calling and Tool Use Examples. Tool search gave an 85% reduction in token usage, and Opus 4 accuracy on MCP evaluations improved from 49% to 74%.

## Status and dates

- Anthropic's post Introducing advanced tool use was published Nov 24, 2025.
- At launch the features were available in beta.
- Programmatic tool calling now uses code_execution_20260120 in allowed_callers.

## Tool search and deferred tools

- Problem: a five-server MCP setup (GitHub, Slack, Sentry, Grafana, Splunk) used about 55K tokens of definitions before any work.
- Mechanism: you still send every definition, but mark rarely used ones `defer_loading: true`; Claude first sees only the search tool and non-deferred tools.
- Variants: regex or BM25 (natural-language) search.
- Results: matches come back as tool references, 5 by default, which the API expands into full definitions.
- At least one tool, normally the search tool, must stay non-deferred; keep 3–5 most used tools loaded.
- Opus 4.5 improved from 79.5% to 88.1% with tool search enabled.

## Programmatic tool calling

- A tool that allows a code execution caller becomes an async Python function in Claude's code.
- Claude writes Python code that calls them and runs it in a sandboxed container.
- Execution pauses at each tool call; your result goes to the script, not into Claude's context, and only the final output returns.
- Reported: average tokens fell from 43,588 to 27,297 (37%) on complex research tasks.

## Tool use examples

- `input_examples` in a tool definition gives sample calls that show format conventions, nested structure patterns and optional parameter correlations.
- Reported: accuracy on complex parameter handling rose from 72% to 90%.
- Use 1–5 realistic examples per tool.

## What you can do with this

- Match the feature to your bottleneck: definition bloat calls for tool search, large intermediate results for programmatic calling, malformed calls for examples.
- Write clear tool names and descriptions; search matches on them.
- Document return formats so Claude's code can parse results.
- Without these APIs, present MCP tools as code on a filesystem so the agent reads definitions on demand.
- This reduced token usage from 150,000 tokens to 2,000.

## See also

- [ao-tools-anthropic-tool-use-loop](https://iinventedlight.com/library/notes/ao-tools-anthropic-tool-use-loop/)
- [ao-tools-parallel-tool-calls](https://iinventedlight.com/library/notes/ao-tools-parallel-tool-calls/)

## References

- [R1] https://www.anthropic.com/engineering/advanced-tool-use
- [R2] https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
- [R3] https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling
- [R4] https://www.anthropic.com/engineering/code-execution-with-mcp

License: CC BY 4.0. Facts-only how-to note by iinventedlight (AI-assisted). Linked pages are references, not licensed sources.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
