unarchive_document
Restore archived documents in Outline wiki by providing the document ID to make them accessible again for editing and viewing.
Instructions
Restore an archived document.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:116-122 (handler)The primary handler function implementing the unarchive_document tool logic. It performs an access check and calls the Outline API to unarchive the specified document.async unarchive_document(args: UnarchiveDocumentInput) { checkAccess(config, 'unarchive_document'); const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.unarchive', { id: args.documentId }) ); return { id: data.id, title: data.title, message: MESSAGES.DOCUMENT_UNARCHIVED }; },
- src/lib/schemas.ts:66-66 (schema)Zod schema defining the input for unarchive_document: an object with a required 'documentId' string.export const unarchiveDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:97-101 (registration)Registration of the unarchive_document tool in the allTools array, specifying its name, description, and linking to the Zod schema.createTool( 'unarchive_document', 'Restore an archived document.', 'unarchive_document' ),
- src/lib/schemas.ts:224-224 (schema)Inclusion of unarchiveDocumentSchema in the central toolSchemas registry map.unarchive_document: unarchiveDocumentSchema,
- src/lib/access-control.ts:17-17 (helper)Lists 'unarchive_document' in WRITE_TOOLS set for access control checks in read-only mode.'unarchive_document',