get_document
Retrieve full document content by ID
Retrieve the complete content of a document, optionally including its chunks.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | REQUIRED | - | UUID of the document |
includeChunks | boolean | OPTIONAL | false | Include document chunks |
maxContentLength | number | OPTIONAL | 4000 | Maximum content characters to return (0 = full content) |
Example Request
Response
The MCP response contains both content (text for LLM consumption) and structuredContent (canonical JSON):
Output Schema
This tool MUST return structuredContent alongside the text response. The structuredContent object MUST use canonical verbose keys regardless of the COMPACT_RESPONSES setting.
| Field | Type | Description |
|---|---|---|
document | object | The document |
document.id | string | Document UUID |
document.title | string | Document title |
document.sourceType | string | Source type (note, file, url) |
document.sourceUrl | string? | Source URL (null if not applicable) |
document.content | string | Document content (may be truncated) |
document.truncated | boolean | Whether content was truncated |
document.fullLength | integer | Full content length (when truncated) |
document.metadata | object? | Document metadata |
document.metadata.tags | string[] | Document tags (within metadata) |
document.createdAt | string | ISO creation timestamp |
document.updatedAt | string | ISO update timestamp |
chunks | array | Document chunks (when includeChunks=true) |
chunks[].id | string | Chunk UUID |
chunks[].index | integer | Chunk index |
chunks[].content | string | Chunk content |
Use Cases
Full Context Retrieval
After searching, get the complete document for context:
Document Inspection
View all chunks for debugging: