Skip to main content
Glama

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
NameRequiredDescriptionDefault
formatNooutline-markdown

Implementation Reference

  • 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, }; },
  • 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 });
  • 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' ),
  • 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; }
  • Maps the tool name to its Zod schema in the central toolSchemas record used by tool definitions.
    export_all_collections: exportAllCollectionsSchema,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huiseo/outline-smart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server