Anthropic killed Tool calling
Quick Overview
Anthropic's Programmatic Tool Calling (PTC) fundamentally changes agent efficiency by allowing the LLM to execute code within a sandbox to handle complex, multi-step tasks, resulting in a 37-50% reduction in token consumption compared to traditional iterative tool calling, especially for tasks involving batch processing, dynamic filtering, and complex parameter handling, which was demonstrated by solving a puzzle much faster and with significantly fewer tokens using Opus 4.5 PTC compared to Sonnet 4.5's traditional method.
Key Points: Programmatic Tool Calling (PTC) reduces token consumption by 37-50% by eliminating network overhead for intermediate steps, shifting computation into a code execution environment. Traditional tool calling required multiple round trips (e.g., 10 messages for a 5-step task), whereas PTC completes complex tasks in just 2 messages (1 script request + 1 final response). PTC enables advanced patterns like batch processing with loops, conditional logic based on intermediate results, and dynamic filtering (e.g., filtering raw HTML dumps before context inclusion). Tool Use Examples within tool definitions significantly improve accuracy (from 72% to 90% in internal testing) for complex parameter handling, such as nested JSON structures in the tool. Tool Search Tool is introduced to manage large toolsets by deferring the loading of infrequently used tools until they are explicitly discovered on-demand, saving initial context tokens. The Opus 4.5 model using PTC solved the 'Victorian Lock' puzzle, requiring multiple Fibonacci calculations and tool invocations, using only 240 total billed tokens, compared to Sonnet 4.5 which used 783,967 tokens for a similar task.
Context: This video introduces Anthropic's Programmatic Tool Calling (PTC), also referred to as Tool Call 2.0, which is an evolution from the traditional JSON-based tool calling method. The core problem addressed is the inefficiency and high token cost associated with the iterative, 'ping-pong' loop of sending a tool call request, waiting for the result, and feeding it back to the LLM for the next step. PTC solves this by allowing the LLM to write and execute code directly within a sandboxed environment to process tool outputs programmatically before synthesizing a final response, leading to massive efficiency gains.