Skip to content
Module
Module 3 of 7Lesson 2 of 2~17 min

Specify tool errors and idempotency

When a tool fails or responds too slowly, an agent may retry, insist or trigger the same action twice for a customer. This lesson teaches you to specify what a tool should return on error and how to make it safe to call again, so that failures stay harmless.

Lesson objective

By the end of this lesson, you will be able to specify the error messages a tool returns to the agent, make tools with side effects idempotent and describe the expected behavior on timeout or partial failure.

Topics covered

  • idempotency
  • error handling
  • tool calling
  • agent reliability
  • side effects

In the glossary

Full glossary

Where it fits

Design tools the model uses well

Which tools should the agent get, how should they be described, and what happens when they fail?

Lessons in this module

  1. Write tool cards the model uses well
  2. Specify tool errors and idempotency (this lesson)

What you will learn in this module

This lesson is part of the course Design reliable agents and tool calling

  • Write tool cards the model uses well (name, description, parameters, return, errors, idempotency, risk level).