Level 8Lesson 70โฑ๏ธ 40 min

Pillar 4 - Tools

Tools are the actions an agent can take. The biggest mistake is giving it too many - fewer, clearer tools beat a giant cluttered toolbox

What Tools Are, in Context Terms

Tools are the actions an agent can take in the world: run a command, search files, query a database, send a message. In Level 1 you learned tools let agents do things. Here's the context-engineering angle: every tool you give the agent also costs context.Each tool's description sits on the desk, taking up the attention budget, whether or not it's ever used.

The reframe: a tool isn't free just because it's "available." Ten tool descriptions are ten things cluttering the desk and ten choices the model has to weigh every turn. Tools are a budget line item, not a freebie.

The #1 Failure: Bloated Tool Sets

Anthropic names this as one of the most common failure modes they see, and it's worth memorizing the rule because it's blunt and useful:

The rule: "If a human engineer can't definitively say which tool should be used in a given situation, an AI agent can't be expected to do better."

When you hand the model two tools that overlap - say search_files and find_in_repo that do almost the same thing - you force it to burn a turn deciding, and it'll sometimes pick wrong. Ambiguity is the enemy.

What Good Tools Look Like

The same qualities that make a tool good for a human teammate make it good for an agent:

Minimal and non-overlapping

The smallest set that covers the job, with no two tools competing for the same situation. When in doubt, cut a tool.

Token-efficient

A tool should return useful, compact results - not a 4,000-line dump. If a tool floods the desk every time it's called, it'll wreck the budget.

Crystal-clear purpose

A self-explanatory name and description, with unambiguous inputs. The model should never have to guess what a tool does or which one to reach for.

Robust to mistakes

Good tools give helpful errors ("path not found, did you mean...") so the agent can recover instead of spiraling.

Fewer Tools, Better Agent

The instinct is to give the agent every capability up front, "just in case." Resist it. The right number of tools is almost always smaller than your first version shipped with.

BLOATED (12 tools)              TIGHT (4 tools)
  search_files                    search        โ† one clear search
  find_in_repo                    read_file
  grep_code                       run_command
  semantic_search                 open_pr
  read_file
  cat_file          โ† overlap!    Easy for the model to choose.
  view_document                   Every tool earns its desk space.
  run_command
  exec_shell        โ† overlap!
  open_pr
  create_pull_request โ† overlap!
  ...the model wastes turns choosing
Bonus benefit: a tight tool set is also easier to maintain and easier to prune over long interactions. Less to keep clean.

MCP: How Tools Plug In

You met MCP (Model Context Protocol) in Levels 1 and 7 - the "USB port" standard for connecting tools to agents. In context-engineering terms, MCP is how the tool pillar is wired up: a standard way to expose a search, a database, or an API as a tool the agent can call. The same context-budget rules apply: just because MCP makes it easyto add 30 tools doesn't mean you should. Add the few that earn their place.

The Four Pillars, Assembled

That completes the four pillars. Each is a different slice of the desk, and each follows the same north star from Lesson 66:

INSTRUCTIONS  โ†’ the right altitude (clear, not brittle, not vague)
RETRIEVAL     โ†’ the right facts, just in time, not a data dump
MEMORY        โ†’ keep what matters, compact/note/isolate the rest
TOOLS         โ†’ few, clear, non-overlapping, token-efficient

All four answer one question: how do I spend a finite
attention budget to get the smallest high-signal desk?

Next lesson: how all four get assembled and pruned into the final context, every turn.

Hands-On: Cut the Toolbox

Hands-on (10 min): Imagine an agent that manages your email. Brainstorm every tool you could give it (read, send, search, label, archive, snooze, draft, summarize, translate, schedule...). Now be ruthless: cut it to the four tools that cover 90% of real use, with no two overlapping. Write a one-line, unambiguous description for each. Notice how much easier it is to imagine the agent choosing correctly with four clear tools than with twelve fuzzy ones. That's the tool pillar in action.
Lesson 70 Quick Reference
Tools cost context

Every tool definition sits in the window using attention budget, whether or not it is used

Bloated tool sets

The #1 tool failure - too many or overlapping tools force the model to waste turns choosing (and choose wrong)

The human test

If a human can't say which tool to use in a situation, the agent can't either - remove the ambiguity

Good tools

Minimal, non-overlapping, token-efficient results, crystal-clear purpose, helpful errors

Fewer is better

The right tool count is almost always smaller than your first version; when in doubt, cut one

MCP

The standard for wiring tools into agents - easy to add many, but the budget rules still apply

โ† Pillar 3 - Memory
Unlocks in ~10 min of reading