Token-Efficient Tool Design

Module 4, Lecture 4.3 | Section 2: Working with LLMs in Practice

Tool results account for 50–70% of tokens in a typical agent session — and unlike system prompts or user messages, tool design is entirely under the engineer's control. This lecture shifts from reactive context management to proactive prevention: how to design tools that return the minimum the model needs, rather than everything available. The core pattern is progressive disclosure — metadata first, specific content on demand — illustrated through a concrete before/after redesign of a naive read_file tool. Pagination and summarized results extend the same principle to search tools and command output.

Read the full lecture narrative

Additional Resources