Question 2 of 5

What belongs in a tool contract?

A model proposes opening a ticket and sends a title and retry delay. The application has to decide whether it can carry out that request.

You ask an assistant to look up stock. The name “cable” could refer to dozens of products. Specify that the stock lookup takes a product code and returns a quantity in units. If the code is missing, it is now clear what to ask for first. This description of the input and result is the tool’s contract.

WHERE TO START

Which inputs does the tool need to identify the ticket?

What to know before this question
Topic example · Permission for an action

Try the close_ticket action and check whether it is on the list.

allowed = {"read_ticket"}
action = "read_ticket"
print(action in allowed)
Line notes
  1. Store the action available to the assistant.
  2. Choose an action to check.
  3. Print whether the action is allowed.

How would you rate your understanding?

This is your self-assessment. Progress is saved in this browser.

Not rated yet

← Back to Tools, agents and MCP