fetch
Read one document you already have an id for. Pass documentId. The result includes the document's id, title, url, and full text, plus its sections, comment threads, and each comment's id. When the document is filed in a folder, the result includes that folder's folderId and folderName. Omit documentVersionId to read the latest draft; pass one to read that version and its comments. Version ids come from list_document_versions. Not a search — use search for a question or a topic. Not a folder listing — use fetch_folder to list a folder or the warehouse root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | The document to read. Use search to find document ids. | |
| documentVersionId | No | Reads that version and its comments. Omit to read the latest draft. Use list_document_versions to find version ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID. Same as documentId. | |
| url | Yes | Canonical URL of the document, for citations | |
| name | Yes | The document name. | |
| text | Yes | Full document text: every section joined in order. | |
| title | Yes | Document name. Same as name. | |
| status | Yes | ||
| threads | Yes | ||
| folderId | No | The folder this document is filed in. Omitted when the document is at the warehouse root. | |
| sections | Yes | ||
| documentId | Yes | ||
| folderName | No | The name of the folder this document is filed in. Omitted when the document is at the warehouse root. | |
| folderPath | No | ||
| resultType | Yes | ||
| versionNumber | Yes | ||
| documentVersionId | Yes |