#How to Fetch Tool Calls and Results from /v1/responses

1 messages · Page 1 of 1 (latest)

proper moss
#

From the /v1/responses endpoint, I only receive regular message content, without any tool messages or tool execution results.

event: response.created
data: {"type":"response.created","response":{"id":"resp_356866de-db3e-41ad-8d2d-032aa8b8daf0","object":"response","created_at":1778638993,"status":"in_progress","model":"openclaw","output":[],"usage":{"input_tokens":0,"output_tokens":0,"total_tokens":0}}}

event: response.in_progress
data: {"type":"response.in_progress","response":{"id":"resp_356866de-db3e-41ad-8d2d-032aa8b8daf0","object":"response","created_at":1778638993,"status":"in_progress","model":"openclaw","output":[],"usage":{"input_tokens":0,"output_tokens":0,"total_tokens":0}}}

event: response.output_item.added
data: {"type":"response.output_item.added","output_index":0,"item":{"type":"message","id":"msg_62406161-b22f-401a-a4c5-61b21bed2a5f","role":"assistant","content":[{"type":"output_text","text":""}],"status":"in_progress"}}

event: response.content_part.added
data: {"type":"response.content_part.added","item_id":"msg_62406161-b22f-401a-a4c5-61b21bed2a5f","output_index":0,"content_index":0,"part":{"type":"output_text","text":""}}

event: response.output_text.delta

sly groveBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

indigo sunBOT
#

This is expected for OpenClaw’s internal tools: /v1/responses is currently an OpenResponses-compatible text/client-tool bridge, not a full trace feed for OpenClaw tool executions.

Two different things here:

  1. OpenClaw/internal tools like browser/exec/message/etc. run inside the Gateway agent turn. Their calls/results are not emitted as function_call_output items from /v1/responses right now.

  2. Client-side function tools that you pass in the request via tools can be surfaced. If the agent chooses one, the response should become status: "incomplete" and include an output item like:

{ "type": "function_call", "call_id": "call_...", "name": "get_weather", "arguments": "..." }

Then your client executes it and sends the next request with:

{ "type": "function_call_output", "call_id": "call_...", "output": "..." }

Also note: in streaming mode, don’t only watch response.output_text.delta; inspect response.output_item.added/done and especially the final response.completed.response.output array. That’s where a client function_call shows up.