get_document
Retrieve complete document content from Outline wiki using a document ID for access and management.
Instructions
Get full document content by document ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:42-47 (handler)The main handler function for the 'get_document' tool. It calls the Outline API endpoint '/documents.info' with the provided documentId, retrieves the document data, and formats it using formatDocumentInfo before returning.async get_document(args: GetDocumentInput) { const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.info', { id: args.documentId }) ); return formatDocumentInfo(data, baseUrl); },
- src/lib/schemas.ts:39-39 (schema)Zod schema for 'get_document' tool input, requiring a 'documentId' string.export const getDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:63-67 (registration)Registers the 'get_document' tool in the allTools array, providing name, description, and schema reference for MCP tool listing.createTool( 'get_document', 'Get full document content by document ID.', 'get_document' ),
- src/lib/schemas.ts:218-218 (schema)Associates the 'get_document' tool name with its input schema in the central toolSchemas mapping used for validation.get_document: getDocumentSchema,
- src/lib/handlers/index.ts:25-25 (registration)Imports and includes the document handlers (including get_document) via createDocumentHandlers in the aggregated ToolHandlers object....createBatchHandlers(ctx),