Courseiva

Build a correct Messages API conversation

Claude Developer · Claude Architect · Claude Associate · about 5 minutes

You are writing the code that sends a tool-using conversation to the Messages API. Choose the correct option for each part.

Where the system prompt goes
Role of the first entry in messages
Message that carries tool results back to Claude
Claude asked for three tools at once; how to return the results
One of the tools failed