Skip to main content
Glama

batch_archive_documents

Archive multiple documents simultaneously in Outline Wiki to organize your workspace by removing outdated or completed files in bulk.

Instructions

Archive multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes

Implementation Reference

  • The main handler function for the 'batch_archive_documents' tool. It checks access, then uses runBatch to archive each document ID via the Outline API's /documents.archive endpoint, collecting success/failure results.
    async batch_archive_documents(args: BatchArchiveDocumentsInput) { checkAccess(config, 'batch_archive_documents'); return runBatch(args.documentIds, async (documentId) => { try { const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.archive', { id: documentId }) ); return { success: true, id: data.id, title: data.title }; } catch (error) { return { success: false, documentId, error: getErrorMessage(error) }; } }); },
  • Zod schema definition for the tool input: requires an array of documentIds.
    export const batchArchiveDocumentsSchema = z.object({ documentIds });
  • TypeScript type inferred from the batchArchiveDocumentsSchema for use in handlers.
    export type BatchArchiveDocumentsInput = z.infer<typeof batchArchiveDocumentsSchema>;
  • Registration of the tool in the allTools array using createTool, which converts the Zod schema to JSON schema for MCP.
    createTool( 'batch_archive_documents', 'Archive multiple documents at once.', 'batch_archive_documents' ),
  • The tool schema is mapped in toolSchemas object, used by createTool in tools.ts.
    batch_archive_documents: batchArchiveDocumentsSchema,

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