Context Tokens

Context tokens refer to the input tokens consumed by language models when processing information needed to inform tool selection and execution in agentic systems. In tool-calling architectures, context tokens include the user query, available tool definitions, system prompts, and any retrieved or provided background information that helps the model decide which tools to invoke and how.

Advanced Tool-Calling Methods

Recent developments in tool-calling efficiency have introduced sophisticated approaches to manage context token usage. Anthropic’s Tool Search Tool represents one such advancement, allowing models to search through large tool libraries without loading all tool definitions into context simultaneously. This approach reduces token consumption when agents have access to extensive tool sets, making it practical to deploy systems with hundreds or thousands of available tools.

Programmatic tool calling extends this concept by enabling models to generate structured tool invocations that are then executed through code rather than relying solely on natural language parsing. This method can improve reliability and reduce the token overhead associated with natural language descriptions of tool parameters and results.

Understanding and optimizing context token usage has become increasingly important as agentic systems grow more complex, since tokens directly impact both latency and operational cost in production environments.

Source Notes