get_doc
Read one document with its draft and its history. Use it before you save or publish, because both need the draft_version and the revision number it gives. Returns the published text, the open draft when there is one, and the revisions newest first.
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>"
},
"name": "get_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the document id, from list_docs or search_docs |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The document id. | |
| body | Yes | The published body. | |
| draft | No | The unsaved draft body, when one is open. A draft is the whole point of this port: it is state that outlives the request that created it, belongs to no revision yet, and must survive a reload without being published. | |
| title | Yes | Its title. | |
| archived | Yes | Archived documents retain their content and can be restored. | |
| revisions | Yes | The revision history, newest first. | |
| draft_at_ms | No | When the draft was last touched, absent when there is none. | |
| draft_differs | Yes | Whether the draft differs from the published body. Computed on the SERVER: a client that decided this for itself would disagree with the server the moment someone else published. | |
| draft_version | Yes | Monotonic fence for every save, discard and publication. | |
| updated_at_ms | Yes | When the document was created, last published, archived or restored: the clock the document list carries for it, so a client holding this view can tell when the list has seen a newer document. | |
| draft_idle_minutes | Yes | How long the draft has been idle, in whole minutes. |