get_document
Reads ONE document in full: its text as Markdown (derived from the ProseMirror tree — not the editor's raw JSON), its declared language, the block it is attached to, its VERSION (the value update_document expects to modify its content — see below), and — if it is one — the metadata of its file attachment (file name, type, size, upload date; not the binary content itself, to be downloaded from the interface). comments counts the discussion threads anchored to this document (open / total): the Markdown text carries NO trace of them — comment marks are removed on purpose. A non-zero count means there is a discussion to read, and list_comments({documentId}) lists it. Field ABSENT = the question could not be asked, which does not mean "no comments". The text is CANONICAL rewritable Markdown: sending it back as is to contentMarkdown gives back the same document for everything the editor represents (backslash escapes, not HTML entities; a literal angle bracket outside code is written \<x>). warnings (ABSENT when nothing is simplified) names what the format does not carry: omitted underline, flattened table cell (list, multiple paragraphs, code block), merged cells, nesting beyond 100 levels not rendered. The response carries url: the DIRECT LINK of the document (opens the project on this document), which the human follows with one click, unlike the title.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | Document identifier, obtained via list_documents. | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |