get_turn
Follow a turn
Reads a turn create_with_awen started: its status, its reply's text, its tasks and the files it saved. status is working, completed, failed or stopped. The reply ends when generations start, and the turn stays working until their tasks end. completed means every file it will make is saved; a task that failed says why in failure, so tell the user and never retry on your own. text is written as generations start and never changes: it can still say an image is generating, and it is null when the reply has no words, so read status and files to know what is ready, and fetch a file for the prompt awen used. tasks and files list at most 50 tasks: more_tasks is true when the turn made more, and list_files shows them all. The call waits up to wait_seconds (0 to 30, default 15) and answers as soon as something changes, so call it again at once while status is working, with no other pause. A turn can end with a question, with or without files: show it to the user and wait, and never answer it yourself. cost_usd is what the turn's model calls and generations were charged. It is null until nothing of the turn still runs, and where usage is hidden from members; titles, summaries and file descriptions are charged apart. Pass the last cursor back, so a change between two calls is not missed. files name each file by id with its mime_type, size_bytes, width, height and duration_seconds, each null when unknown. With include_downloads, each file also has a download_url valid 5 minutes, or null when it cannot be downloaded; without it, pass an id to fetch for one. To follow several turns at once, call get_turns.
- Permission:
awen:read - Also an API operation:
POST /api/v1/get_turn
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
turn_id | string | Yes | The turn_id create_with_awen returned, a conversation's active_turn_id, or an answer's turn_id from fetch on a conversation. |
cursor | string | No | The cursor of the last answer. Without it, the wait starts from the turn as it is now. |
wait_seconds | integer | No | How long to wait for a change. 0 answers at once. |
include_downloads | boolean | No | Adds a download_url, valid 5 minutes, to each file. Ask for it once the files you need are listed. |
Call
A host sends a tools/call request to the MCP endpoint, with the arguments it needs.
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "get_turn", "arguments": { "turn_id": "<string>" } }}Arguments schema
{ "type": "object", "properties": { "turn_id": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$", "description": "The turn_id create_with_awen returned, a conversation's active_turn_id, or an answer's turn_id from fetch on a conversation." }, "cursor": { "description": "The cursor of the last answer. Without it, the wait starts from the turn as it is now.", "type": "string", "minLength": 1, "maxLength": 512 }, "wait_seconds": { "description": "How long to wait for a change. 0 answers at once.", "type": "integer", "minimum": 0, "maximum": 30 }, "include_downloads": { "description": "Adds a download_url, valid 5 minutes, to each file. Ask for it once the files you need are listed.", "type": "boolean" } }, "required": [ "turn_id" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "turn_id": { "type": "string" }, "conversation_id": { "type": "string" }, "project_id": { "type": "string" }, "status": { "type": "string", "enum": [ "working", "completed", "failed", "stopped" ] }, "cursor": { "type": "string" }, "text": { "type": [ "string", "null" ] }, "tasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "tool": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "running", "completed", "failed" ] }, "failure": { "type": [ "string", "null" ] } }, "required": [ "id", "tool", "status", "failure" ], "additionalProperties": false } }, "files": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "entry_id": { "type": [ "string", "null" ] }, "media_id": { "type": "string" }, "revision_id": { "type": "string" }, "kind": { "type": "string", "enum": [ "folder", "image", "video", "canvas", "three_d", "whiteboard", "file" ] }, "name": { "type": "string" }, "url": { "type": "string" }, "mime_type": { "type": [ "string", "null" ] }, "size_bytes": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "width": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "null" } ] }, "height": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "null" } ] }, "duration_seconds": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "null" } ] }, "download_url": { "type": [ "string", "null" ] } }, "required": [ "id", "entry_id", "media_id", "revision_id", "kind", "name", "url", "mime_type", "size_bytes", "width", "height", "duration_seconds" ], "additionalProperties": false } }, "more_tasks": { "type": "boolean" }, "failure": { "type": [ "string", "null" ] }, "cost_usd": { "type": [ "number", "null" ] }, "url": { "type": "string" } }, "required": [ "turn_id", "conversation_id", "project_id", "status", "cursor", "text", "tasks", "files", "more_tasks", "failure", "cost_usd", "url" ], "additionalProperties": false}