Designing Simple Tool Interfaces › Chaining Tools

Michael BrenndoerferJune 25, 20251 min read
AI Agent HandbookAll chapters
Part 5 of 15Tool Use - Extending the Agent's Abilities
Chapter 13Designing Simple Tool Interfaces › Chaining Tools
Reading section 8 of 12 · Chaining Tools · 1 minSection 8 of 12 · 1 min

Section 8 of 12 · 1 min read

Designing Simple Tool Interfaces › Chaining ToolsSection view · Sections in this chapter8 / 12 ↓
Reading tools Notes & comments
Notes & comments

Sometimes answering a question requires using multiple tools in sequence. Consider this request:

Code
CollapseExpand
User: What should I wear for my meeting tomorrow in Chicago?

To answer this, the agent needs to:

  1. Check the calendar to find when the meeting is
  2. Get the weather forecast for Chicago at that time
  3. Reason about appropriate attire based on the weather and meeting type

This is called tool chaining. The output of one tool becomes input to the next:

Code
CollapseExpand
Step 1: check_calendar(date="tomorrow")
→ Result: Meeting at 2 PM, type: "client presentation"

Step 2: get_forecast(city="Chicago", date="tomorrow", time="2 PM")
→ Result: 45°F, rainy

Step 3: Agent reasons about the results
→ Response: "Your client presentation in Chicago tomorrow is at 2 PM. 
   It will be 45°F and rainy, so I'd recommend business attire with 
   a coat and umbrella."

The agent orchestrates this sequence, using the output from each tool to inform what to do next. This is where the agent's reasoning capabilities (from Chapter 4) combine with its tool use abilities to handle complex, multi-step tasks.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy