export_document
Export Outline wiki documents as Markdown files for backup, sharing, or migration purposes.
Instructions
Export document in Markdown format.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:49-54 (handler)The core handler function for the 'export_document' tool. It receives ExportDocumentInput containing the documentId, makes an API call to Outline's '/documents.export' endpoint, and returns the exported document content (Markdown format).async export_document(args: ExportDocumentInput) { const { data } = await apiCall(() => apiClient.post<string>('/documents.export', { id: args.documentId }) ); return data; },
- src/lib/schemas.ts:40-40 (schema)Zod schema defining the input for export_document tool: requires a 'documentId' string.export const exportDocumentSchema = z.object({ documentId });
- src/lib/schemas.ts:176-176 (schema)TypeScript type inferred from the exportDocumentSchema for type safety in handlers.export type ExportDocumentInput = z.infer<typeof exportDocumentSchema>;
- src/lib/tools.ts:68-73 (registration)Registers the 'export_document' tool definition, including name, description, and references the Zod schema converted to JSON Schema for MCP protocol.createTool( 'export_document', 'Export document in Markdown format.', 'export_document' ),
- src/lib/schemas.ts:219-219 (registration)Maps the tool name 'export_document' to its schema in the central toolSchemas object used across the application.export_document: exportDocumentSchema,