Skip to main content
Glama

archive_document

Archive documents in Outline wiki to organize content and reduce clutter. This tool moves documents to archived status while preserving their data.

Instructions

Archive a document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • The core handler function for the 'archive_document' tool. It performs an access check, calls the Outline API to archive the document by ID, and returns the document's ID, title, archived timestamp, and a success message.
    async archive_document(args: ArchiveDocumentInput) { checkAccess(config, 'archive_document'); const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.archive', { id: args.documentId }) ); return { id: data.id, title: data.title, archivedAt: data.archivedAt, message: MESSAGES.DOCUMENT_ARCHIVED }; },
  • Zod schema definition for the input of archive_document tool, requiring a 'documentId' string.
    export const archiveDocumentSchema = z.object({ documentId });
  • src/lib/tools.ts:93-96 (registration)
    Registers the MCP tool definition for 'archive_document', including name, description, and reference to its schema.
    'archive_document', 'Archive a document.', 'archive_document' ),
  • Maps the tool name 'archive_document' to its Zod schema in the central toolSchemas object used by tool definitions.
    archive_document: archiveDocumentSchema,
  • Includes 'archive_document' in the set of write operations requiring access checks in read-only mode.
    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