Skip to main content
Glama

unarchive_document

Restore archived documents in Outline wiki to make them accessible again for editing and viewing.

Instructions

Restore an archived document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • The core handler function for the unarchive_document tool. It checks access, calls the Outline API to unarchive the document, and returns the document ID, title, and success message.
    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 }; },
  • The core handler function for the unarchive_document tool. It performs access check, calls the Outline API /documents.unarchive endpoint with the document ID, and returns the document ID, title, and success message.
    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 }; },
  • Zod input schema definition for unarchive_document tool: requires a valid documentId string.
    export const unarchiveDocumentSchema = z.object({ documentId });
  • Zod schema definition for UnarchiveDocumentInput, requiring a documentId string.
    export const unarchiveDocumentSchema = z.object({ documentId });
  • TypeScript type definition for UnarchiveDocumentInput inferred from the Zod schema.
    export type UnarchiveDocumentInput = z.infer<typeof unarchiveDocumentSchema>;
  • Registers the unarchive_document tool in the allTools array, providing name, description, and schema reference.
    'unarchive_document', 'Restore an archived document.', 'unarchive_document'
  • Maps the unarchive_document tool name to its Zod schema in the central toolSchemas object used across the application.
    unarchive_document: unarchiveDocumentSchema,
  • Registration of the unarchive_document tool in the allTools array. Converts the Zod schema to JSON Schema and defines the tool name and description for MCP.
    createTool( 'unarchive_document', 'Restore an archived document.', 'unarchive_document' ),
  • Includes unarchive_document in the WRITE_TOOLS set for access control checks.
    'unarchive_document',
  • Access control configuration listing unarchive_document as a write operation tool that requires permission checks via checkAccess.
    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