archive_document
Archive documents in Outline wiki to remove them from active view while preserving content for future reference or compliance needs.
Instructions
Archive a document.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:108-114 (handler)Handler function that archives a document by calling the Outline API's /documents.archive endpoint.async archive_document(args: ArchiveDocumentInput) { checkAccess(config, 'archive_document'); const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.archive', { id: args.documentId }) ); return { id: data.id, title: data.title, archivedAt: data.archivedAt, message: MESSAGES.DOCUMENT_ARCHIVED }; },
- src/lib/schemas.ts:65-65 (schema)Zod input schema for the archive_document tool, requiring a documentId.export const archiveDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:92-96 (registration)Registration of the archive_document tool definition, including name, description, and schema reference.createTool( 'archive_document', 'Archive a document.', 'archive_document' ),
- src/lib/schemas.ts:223-223 (schema)Mapping of archive_document tool name to its schema in the toolSchemas object.archive_document: archiveDocumentSchema,
- src/lib/handlers/index.ts:26-27 (registration)Handler registration: spreading document handlers (including archive_document) into the main ToolHandlers object....createSmartHandlers(ctx), } as ToolHandlers;