archive_document
Archive documents in Outline wiki by moving them to archived status. Use this tool to remove active documents from regular view while preserving their content.
Instructions
Archive a document.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:108-114 (handler)The main handler function for the 'archive_document' tool. It checks access, calls the Outline API to archive the document, and returns the document ID, title, archivedAt timestamp, and a success message.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 schema definition for the 'archive_document' tool input, requiring a documentId string.export const archiveDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:92-96 (registration)Tool registration in the allTools array using createTool, specifying name, description, and schema reference.createTool( 'archive_document', 'Archive a document.', 'archive_document' ),
- src/lib/schemas.ts:223-223 (schema)Inclusion of the archive_document schema in the central toolSchemas map used for generating JSON schemas.archive_document: archiveDocumentSchema,
- src/lib/schemas.ts:223-223 (registration)The toolSchemas object maps tool names to their Zod schemas, used in tool definition generation.archive_document: archiveDocumentSchema,