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
| Name | Required | Description | Default |
|---|---|---|---|
| documentIds | Yes |
Implementation Reference
- src/lib/handlers/batch.ts:102-115 (handler)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) }; } }); },
- src/lib/schemas.ts:137-137 (schema)Zod schema definition for the tool input: requires an array of documentIds.export const batchArchiveDocumentsSchema = z.object({ documentIds });
- src/lib/schemas.ts:198-198 (schema)TypeScript type inferred from the batchArchiveDocumentsSchema for use in handlers.export type BatchArchiveDocumentsInput = z.infer<typeof batchArchiveDocumentsSchema>;
- src/lib/tools.ts:188-192 (registration)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' ),
- src/lib/schemas.ts:241-241 (registration)The tool schema is mapped in toolSchemas object, used by createTool in tools.ts.batch_archive_documents: batchArchiveDocumentsSchema,