ReferenceCreate
cancel_turn
Stop a turn
Stops a running turn, as Stop does in awen: it saves what the reply wrote so far, charges the model calls that finished and frees the conversation. Generations that already started finish and are charged. A turn that already ended is left as it is. Answers the turn's status.
- Permission:
awen:createawen:write - Also an API operation:
POST /api/v1/cancel_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. |
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": "cancel_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." } }, "required": [ "turn_id" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "status": { "type": "string", "enum": [ "working", "completed", "failed", "stopped" ] } }, "required": [ "status" ], "additionalProperties": false}