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 core handler function for the unarchive_document tool. It performs access check and calls the Outline API /documents.unarchive endpoint with the document ID.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: requires a valid documentId string.export const unarchiveDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:97-101 (registration)Registers the unarchive_document tool in the allTools array, providing name, description, and linking to its Zod schema for MCP tool definition.createTool( 'unarchive_document', 'Restore an archived document.', 'unarchive_document' ),
- src/lib/schemas.ts:224-224 (schema)Maps the tool name 'unarchive_document' to its schema in the central toolSchemas object used by tool definitions.unarchive_document: unarchiveDocumentSchema,
- src/lib/handlers/index.ts:22-22 (registration)Includes the document handlers (containing unarchive_document) into the complete set of tool handlers....createDocumentHandlers(ctx),