Skip to main content
Glama

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
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • 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); },
  • Zod schema definition for the input of restore_document tool, requiring a documentId.
    export const restoreDocumentSchema = z.object({ documentId });
  • 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' ),
  • Mapping of 'restore_document' tool name to its schema in the central toolSchemas object.
    restore_document: restoreDocumentSchema,
  • 'restore_document' is listed as a write operation tool in the WRITE_TOOLS set for access control checks.
    'restore_document',

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