Skip to main content
Module 4 of 8

Tools, MCP and the agent loop

Why: Until now TestPilot only sees what you paste into the request. With tools it can fetch the history, read the full log and check the commit itself, and with that power comes the question every architect has to answer: what may it do on its own?

You design TestPilot’s toolbox before writing a loop, write tool descriptions the model can act on, separate read-only tools from tools that change things, build the loop from first tool call to final verdict, return errors the model can recover from, test the loop without calling the API, and serve the tools over MCP so both TestPilot and Claude Code can use them.

Lessons

  1. Design the toolbox first (25 min) - intermediate
  2. A tool description is a spec (30 min) - intermediate
  3. Read-only tools and tools that change things (25 min) - intermediate
  4. The loop: from first tool call to final verdict (35 min) - intermediate
  5. Errors the model can act on (30 min) - intermediate
  6. Testing a loop with a scripted model (30 min) - advanced
  7. TestPilot’s tools as an MCP server (35 min) - advanced
  8. One server, two clients: TestPilot and Claude Code (20 min) - intermediate
  9. Quiz: tools and loops (15 min) - intermediate