get_document
Retrieve complete document content from Outline wiki using its unique document ID for viewing or processing.
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 primary handler function for the 'get_document' tool. It calls the Outline API's '/documents.info' endpoint with the documentId to retrieve the document details and formats the output using formatDocumentInfo, including the base URL.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 input schema for the 'get_document' tool, requiring a single 'documentId' field (defined earlier as z.string().min(1)). This schema is used for input validation.export const getDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:64-68 (registration)Registers the 'get_document' tool in the allTools export array. Converts the Zod schema to JSON Schema for MCP compatibility and defines the tool's name and description.'get_document', 'Get full document content by document ID.', 'get_document' ), createTool(