Skip to main content
Glama

batch_archive_documents

Archive multiple Outline wiki documents simultaneously to manage document lifecycle and reduce clutter.

Instructions

Archive multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes

Implementation Reference

  • The main handler function for batch_archive_documents, which archives multiple documents by calling the Outline API's /documents.archive endpoint for each document ID, using the shared runBatch helper.
    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 input: requires an array of documentIds.
    export const batchArchiveDocumentsSchema = z.object({ documentIds });
  • TypeScript type derived from the Zod schema for type safety in handlers.
    export type BatchArchiveDocumentsInput = z.infer<typeof batchArchiveDocumentsSchema>;
  • Registration of the tool in the allTools array, converting Zod schema to JSON schema for MCP.
    createTool( 'batch_archive_documents', 'Archive multiple documents at once.', 'batch_archive_documents' ),
  • The schema is mapped to the tool name in toolSchemas object, used by tools.ts.
    batch_archive_documents: batchArchiveDocumentsSchema,
  • Listed in WRITE_TOOLS set for access control checks.
    'batch_archive_documents',

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-wiki-mcp'

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