Get Document
get-documentReads an ODocs.co document by ID. The default result is a readable plaintext (.txt-style) view: a metadata frontmatter (id, title, version, persistent, commentCount, openCommentCount, note) followed by the body. format:"json" returns { id, title, content, version, persistent, commentCount, openCommentCount } as an object; frontmatter:false returns just the body. version is the value patch-document accepts as expectedVersion for conflict detection. openCommentCount is the number of unresolved comment threads; includeComments:true adds the threads to the result. persistent is true for a document saved in the cloud, false for a temporary one. The note (that the text is written by anyone with the link) is the frontmatter's note field in the text view; json and frontmatter:false results carry it as a second text item.
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-document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID (UUID from the doc URL) | |
| format | No | Response format: 'text' (default) is a readable .txt-style view; 'json' is the structured object. | |
| frontmatter | No | (text format only) Include the metadata frontmatter block. Default true; false returns just the body. | |
| includeComments | No | Include the comment threads in the result (the same threads list-comments returns). Default false. In json they are a comments array. In text format each thread wraps the text at its anchor (placement="anchor": the commented copy; the wrapped text with the tag's occurrence="N" matches that copy as a find/anchor in patch-document's text-anchored operations; an edit that adds, changes or removes a lower copy renumbers the higher ones; no occurrence means that copy can't be matched by its text alone, only by a find that includes neighbouring text; a quote="…" attribute means the text was edited since and holds the original quote). If the anchor is lost the thread is detached (orphaned="true" state="detached": its text was changed or removed) and it wraps the earliest place its quote appears (placement="text": possibly another copy). A thread overlapping one already wrapped is listed at the end with overlaps="<thread id>"; one whose quote is not found is listed at the end with orphaned="true" state="detached". |