export_document
Export Outline wiki documents to Markdown format for offline use, sharing, or backup by specifying the document ID.
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 handler function that executes the export_document tool by calling the Outline API's /documents.export endpoint with the document ID and returning the exported content.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: requires a valid documentId string.export const exportDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:68-72 (registration)Registers the export_document tool in the MCP allTools array, generating JSON schema from Zod for MCP protocol.createTool( 'export_document', 'Export document in Markdown format.', 'export_document' ),
- src/lib/schemas.ts:219-219 (registration)Associates the export_document tool name with its schema in the central toolSchemas mapping used by tool definitions.export_document: exportDocumentSchema,
- src/lib/schemas.ts:176-176 (schema)TypeScript type for ExportDocumentInput inferred from the exportDocumentSchema.export type ExportDocumentInput = z.infer<typeof exportDocumentSchema>;