Skip to main content
Glama

restore_document

Recover deleted documents from the Outline wiki trash to restore access and content.

Instructions

Restore a document from trash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • The main execution handler for the 'restore_document' tool. It performs an access check, calls the Outline API endpoint '/documents.restore' with the document ID, and returns a formatted document 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); },
  • Zod input schema for 'restore_document' tool, requiring a 'documentId' string.
    export const restoreDocumentSchema = z.object({ documentId });
  • Registration of the 'restore_document' tool in the MCP tools list, providing name, description, and schema reference.
    'restore_document', 'Restore a document from trash.', 'restore_document'
  • TypeScript type definition for RestoreDocumentInput inferred from the restoreDocumentSchema.
    export type RestoreDocumentInput = z.infer<typeof restoreDocumentSchema>;
  • Access control helper listing 'restore_document' as a write operation, used in checkAccess to enforce permissions.
    const WRITE_TOOLS = new Set([ 'create_document', 'update_document', 'move_document', 'archive_document', 'unarchive_document', 'delete_document', 'restore_document', 'add_comment', 'create_collection', 'update_collection', 'delete_collection', 'batch_create_documents', 'batch_update_documents', 'batch_move_documents', 'batch_archive_documents', 'batch_delete_documents', ]);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huiseo/outline-smart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server