Clatter LabsHelp Center

How do I send a tool's result back?

How-toUpdated

After the model's reply with tool_calls:

  1. Append that assistant message (with its tool_calls) to messages.
  2. For each call, append:
{"role": "tool", "tool_call_id": "call_abc123", "content": "{\"status\": \"shipped\", \"eta\": \"Nov 5\"}"}
  1. Call the API again with the same tools.

content is a string; JSON text is the usual choice. If the tool failed, say so in the content ("error: order not found") so the model can explain or try something else.

Good to know#

  • Your key's account is responsible for your end users' text under the Abuse policy. What it means for apps
  • New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing
  • Model ids: supercosmos-flash, supercosmos-max, supercosmos-heavy (SuperCosmos 1.1). Which to call

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.