export_all_collections
Export all Outline wiki collections to Markdown or JSON format for backup, migration, or external use.
Instructions
Export all collections.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | outline-markdown |
Implementation Reference
- src/lib/handlers/collections.ts:77-87 (handler)The core handler function for the 'export_all_collections' tool. It calls the Outline API's '/collections.export_all' endpoint with the provided format and returns a success response with file operation details.async export_all_collections(args: ExportAllCollectionsInput) { const { data } = await apiCall(() => apiClient.post<unknown>('/collections.export_all', { format: args.format }) ); return { success: true, format: args.format, fileOperation: data, message: MESSAGES.COLLECTION_EXPORT_ALL_STARTED, }; },
- src/lib/schemas.ts:108-108 (schema)Zod schema defining the input parameters for the tool: an object with 'format' field (enum: 'outline-markdown' or 'json').export const exportAllCollectionsSchema = z.object({ format: exportFormat });
- src/lib/tools.ts:166-170 (registration)Registers the MCP tool definition in the allTools array by calling createTool with the tool name, description, and schema key, converting Zod schema to JSON Schema.createTool( 'export_all_collections', 'Export all collections.', 'export_all_collections' ),
- src/lib/handlers/index.ts:19-28 (registration)Combines all handler factories into a single ToolHandlers object, including createCollectionHandlers which provides the export_all_collections handler.export function createAllHandlers(ctx: AppContext): ToolHandlers { return { ...createSearchHandlers(ctx), ...createDocumentHandlers(ctx), ...createCollectionHandlers(ctx), ...createCommentHandlers(ctx), ...createBatchHandlers(ctx), ...createSmartHandlers(ctx), } as ToolHandlers; }
- src/lib/schemas.ts:237-237 (registration)Maps the tool name to its Zod schema in the central toolSchemas record used by tool definitions.export_all_collections: exportAllCollectionsSchema,