get_turns
Follow several turns
Follows up to 10 turns create_with_awen started, in one call. Each turn reads as get_turn reads it: status, task_counts, files, more_tasks, failure, cost_usd and its reply's text, with the same meanings. The call waits up to wait_seconds (0 to 30, default 15) and answers as soon as any turn changes, or at once when none can change any more, so call it again at once while a turn is working, with no other pause. Pass the last cursor back with the same turn_ids, so a change between two calls is not missed: a turn's text is then left out when it has not changed since that answer. A turn that is not found answers error and no other field. Call get_turn for a turn's tasks and why each failed, and with include_downloads for its files' download links.
- Permission:
awen:read - Also an API operation:
POST /api/v1/get_turns
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
turn_ids | array of string | Yes | The turn_ids create_with_awen returned, conversations' active_turn_id, or answers' turn_id from fetch on a conversation. |
cursor | string | No | The cursor of the last answer. Without it, the wait starts from the turns as they are now. |
wait_seconds | integer | No | How long to wait for a change. 0 answers at once. |
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_turns", "arguments": { "turn_ids": "<array of string>" } }}Arguments schema
{ "type": "object", "properties": { "turn_ids": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "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." }, "description": "The turn_ids create_with_awen returned, conversations' active_turn_id, or answers' turn_id from fetch on a conversation." }, "cursor": { "description": "The cursor of the last answer. Without it, the wait starts from the turns as they are now.", "type": "string", "minLength": 1, "maxLength": 4096 }, "wait_seconds": { "description": "How long to wait for a change. 0 answers at once.", "type": "integer", "minimum": 0, "maximum": 30 } }, "required": [ "turn_ids" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "turns": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "turn_id": { "type": "string" }, "conversation_id": { "type": "string" }, "project_id": { "type": "string" }, "status": { "type": "string", "enum": [ "working", "completed", "failed", "stopped" ] }, "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" }, "text": { "type": [ "string", "null" ] }, "task_counts": { "type": "object", "properties": { "running": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "completed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "failed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "running", "completed", "failed" ], "additionalProperties": false } }, "required": [ "turn_id", "conversation_id", "project_id", "status", "files", "more_tasks", "failure", "cost_usd", "url", "task_counts" ], "additionalProperties": false }, { "type": "object", "properties": { "turn_id": { "type": "string" }, "error": { "type": "string", "const": "Not found. Use the turn_id create_with_awen returned, a conversation's active_turn_id from list_conversations, or an answer's turn_id from fetch on the conversation." } }, "required": [ "turn_id", "error" ], "additionalProperties": false } ] } }, "cursor": { "type": "string" } }, "required": [ "turns", "cursor" ], "additionalProperties": false}