Skip to content
Covo Developers

Reference

Discard a draft

Closes an open draft without applying it.

RESTPOST /api/v1/agents/{agent_id}/drafts/{draft_id}/discard
MCP tooldiscard_draft
ClassificationWrite
Scopeagents:write
Minimum role on the agenteditor
ConfirmationNot needed
Retry safetySafe to retry with the same input
Success status200

What it does

Closes an open draft without applying it.

Side effects

Closes the draft. The configuration is untouched.

Inputs

NameTypeRequiredInDescription
agent_idstringyespathThe agent id (agt_...), from list_agents.
draft_idstringyespathThe draft id.

Example

REST
curl -X POST "https://covo.lanaai.io/api/v1/agents/agt_4edc89bb2964/drafts/ba5e403e-7650-449d-b575-beaffff3401b/discard" \
  -H "Authorization: Bearer $COVO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
MCP (POST /mcp)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discard_draft",
    "arguments": {
      "agent_id": "agt_4edc89bb2964",
      "draft_id": "ba5e403e-7650-449d-b575-beaffff3401b"
    }
  }
}

Response

Returns an object with draft_id and status. This is a real response, shortened to two items per list.

200 response
{
  "draft_id": "ba5e403e-7650-449d-b575-beaffff3401b",
  "status": "discarded"
}

Over MCP the same object comes back as the tool result, in structuredContent and as JSON text.

Errors

StatusCodeMeaning
401unauthorizedNo token, or it is unknown, revoked or expired. OAuth apps refresh or reconnect.
403account_suspendedThe account that owns the token is paused.
403insufficient_scopeThe token lacks agents:write.
404agent_not_foundUnknown agent, or not reachable with this token.
400bad_requestAn input is invalid; field names it.
429rate_limitedWait Retry-After seconds.