discard_draft
Throw away the document's open draft. Use it to drop unpublished changes; the published text and every revision stay as they are. Returns the new draft_version, or a conflict when the draft has changed since the version you name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"expect_draft_version": "<expect_draft_version>"
},
"name": "discard_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the document id, from list_docs or search_docs | |
| expect_draft_version | Yes | the draft_version from get_doc or from your last save |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The document id. | |
| has_draft | Yes | Whether a draft is now open. | |
| draft_differs | Yes | Whether it differs from the published body. | |
| draft_version | Yes | The version acknowledged by this mutation. |