Skip to main content
Glama

export_collection

Export collections from Outline wiki in Outline Markdown or JSON format for backup, migration, or external use.

Instructions

Export a collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes
formatNooutline-markdown

Implementation Reference

  • The core handler function implementing the export_collection tool logic. It makes an API call to '/collections.export' with the collection ID and format, returning success status and 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 defining the input for export_collection: requires collectionId (UUID) and format (enum: 'outline-markdown' or 'json').
    export const exportCollectionSchema = z.object({ collectionId, format: exportFormat });
  • Registers the export_collection tool in the allTools array using createTool, linking to its schema and description for MCP tool discovery.
    createTool( 'export_collection', 'Export a collection.', 'export_collection' ),
  • TypeScript type inferred from the exportCollectionSchema for type-safe input handling in the handler.
    export type ExportCollectionInput = z.infer<typeof exportCollectionSchema>;
  • Maps the export_collection tool name to its schema in the central toolSchemas object used by tool definitions.
    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