restore_document
Recover deleted documents from trash in Outline wiki by specifying the document ID to restore them to their original location.
Instructions
Restore a document from trash.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes |
Implementation Reference
- src/lib/handlers/documents.ts:137-143 (handler)The main handler function for the 'restore_document' tool. It performs an access check and calls the Outline API to restore the document from trash, returning formatted result.async restore_document(args: RestoreDocumentInput) { checkAccess(config, 'restore_document'); const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.restore', { id: args.documentId }) ); return docResult(data, MESSAGES.DOCUMENT_RESTORED); },
- src/lib/schemas.ts:67-67 (schema)Zod schema definition for the input of restore_document tool, requiring a documentId.export const restoreDocumentSchema = z.object({ documentId });
- src/lib/tools.ts:107-111 (registration)Registration of the 'restore_document' tool in the allTools array, providing name, description, and schema reference.createTool( 'restore_document', 'Restore a document from trash.', 'restore_document' ),
- src/lib/schemas.ts:226-226 (schema)Mapping of 'restore_document' tool name to its schema in the central toolSchemas object.restore_document: restoreDocumentSchema,
- src/lib/access-control.ts:19-19 (helper)'restore_document' is listed as a write operation tool in the WRITE_TOOLS set for access control checks.'restore_document',