Introducing advanced tool use for Claude
Claude's API gains three tool-use features aimed at agents working with large tool libraries: Tool Search Tool, Programmatic Tool Calling and Tool Use Examples. Tool Search defers loading of tool definitions via `defer_loading` and discovers them on demand with regex, BM25 or custom search. It cuts context use by about 85% and raises MCP eval accuracy, with Opus 4 going from 49% to 74%. Programmatic Tool Calling lets Claude write Python that calls tools inside a sandboxed code execution environment, so only final output enters context. On complex research tasks this lowered tokens by 37% and also reduced inference round-trips and errors. Guidance covers when each feature pays off: search for >10 tools or >10K tokens of definitions, and code orchestration for multi-step or large-data workflows.
Related posts
- ToolGrad: Efficient tool-use dataset generation with textual "gradients"
Google Research hardMasterToolGrad generates synthetic tool-use training data answer-first: it builds a verified API chain iteratively, then has an LLM write the matching user query, instead of inventing a query and searching for a solution with a DFS agent as ToolBench and ToolACE do. Borrowing TextGrad's idea of textual "gradients", each iteration runs four modules: an API Proposer, parallel API Executors, an API Selector that picks the best call as directional feedback, and an LLM Updater that revises the query and response. On ToolBench's 16k+ APIs this reaches a 99.8% pass rate with fewer steps than DFS. Gemma-3 12B fine-tuned on just 500 such samples scores 83.1 on the Berkeley Function Calling Leaderboard, close to gemini-2.5-pro (83.2) and ahead of its gemini-2.5-flash-lite teacher.
- Building Deep Research: How we Achieved State of the Art
Hugging Face mediumAdeptTavily's deep research agent reached state of the art on DeepResearch Bench while using 66% fewer tokens than LangChain's Open Deep Research, mainly through context engineering. Each tool output is distilled into a short reflection, and only past reflections are passed to the tool-calling model. Raw sources come back only for the final write-up. This turns token growth from quadratic (n·m(m+1)/2) into linear (n·m) across m iterations. Other lessons: keep orchestration simple so future model gains carry through, deduplicate sources through global state, expose a small toolset, design for failure modes, and treat LLM-as-judge evals as directional feedback rather than the optimization target.
- Agent experience and agent-led growth: a chat with Caelean Barnes
Mux easyNovice
Coding agents like Claude Code and Codex increasingly choose which developer tools get adopted, and Gauge measures that choice by running agents in sandboxes, checkpointing sessions, and testing variants of prompts, docs, skills and CLIs against success criteria over many trials. Technical documentation, especially framework-specific setup guides that match the agent's codebase, drives tool selection more than marketing content. Small wording changes have large effects: turning Clerk's "claim your key" prompt into an error roughly tripled CLI account creation, and rephrasing a skill-install suggestion as "verify you have the skill installed" stopped agents from treating it as prompt injection. Detailed, actionable error messages and CLIs with well-defined commands tend to work better for agents than static skill files, which are hard to update.
- Designing the hf CLI as an agent-optimized way to work with the Hub
Hugging Face mediumAdeptHugging Face rebuilt its hf CLI to serve both humans and coding agents. It detects agents via environment variables like CLAUDECODE and CODEX_SANDBOX and switches to untruncated, ANSI-free TSV output, sends hints and errors to stderr, fails fast instead of prompting, and supports idempotent retries, --dry-run and consistent resource+verb commands. In a benchmark of ~1,000 graded runs across 18 Hub tasks on Claude Code (Sonnet 4.6) and Codex (GPT-5.5), agents hand-rolling curl or the Python SDK used 1.3-1.8× more tokens overall, and up to 6× on multi-step tasks. On Sonnet they also succeeded less often (84% vs 94%) and falsely reported success more often. A generated skill file covering the full command surface adds a further small reduction in tool calls.
- Tool Use, Unified
Hugging Face mediumAdeptHugging Face Transformers extends Jinja chat templates to cover tool use, giving a single portable API for passing tools to Mistral, Cohere, NousResearch and Llama models. Tools are defined as JSON schema, or as Python functions whose type hints and docstrings are converted automatically via get_json_schema. Tool calls go into the chat as a tool_calls field on assistant messages, and results are added as separate tool-role messages. A full walkthrough with Hermes-2-Pro-Llama-3-8B shows the loop end to end. Parsing the model's emitted tool-call text is still model-specific and needs a little json.loads or regex work.