Skip to main content
Glama

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
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • 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; },
  • 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' ),
  • Associates the export_document tool name with its schema in the central toolSchemas mapping used by tool definitions.
    export_document: exportDocumentSchema,
  • TypeScript type for ExportDocumentInput inferred from the exportDocumentSchema.
    export type ExportDocumentInput = z.infer<typeof exportDocumentSchema>;

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