Skip to main content
Glama

export_collection

Export Outline wiki collections to Markdown or JSON formats for backup, migration, or external use.

Instructions

Export a collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes
formatNooutline-markdown

Implementation Reference

  • The main handler function for the 'export_collection' tool. It calls the Outline API to start exporting the specified collection in the given format and returns a success response with file operation details.
    async export_collection(args: ExportCollectionInput) { const { data } = await apiCall(() => apiClient.post<unknown>('/collections.export', { id: args.collectionId, format: args.format }) ); return { success: true, collectionId: args.collectionId, format: args.format, fileOperation: data, message: MESSAGES.COLLECTION_EXPORT_STARTED, }; },
  • Zod schema definition for 'export_collection' tool input, requiring a UUID collectionId and optional export format (default 'outline-markdown').
    export const exportCollectionSchema = z.object({ collectionId, format: exportFormat });
  • TypeScript type derived from the exportCollectionSchema for use in handlers.
    export type ExportCollectionInput = z.infer<typeof exportCollectionSchema>;
  • Registration of the 'export_collection' tool in the allTools array, converting the Zod schema to JSON Schema for MCP.
    createTool( 'export_collection', 'Export a collection.', 'export_collection' ),
  • Entry in the toolSchemas map that associates 'export_collection' with its Zod schema.
    export_collection: exportCollectionSchema,

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