Skip to main content
Glama

archive_document

Archive documents in Outline wiki by moving them to archived status. Use this tool to remove active documents from regular view while preserving their content.

Instructions

Archive a document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes

Implementation Reference

  • The main handler function for the 'archive_document' tool. It checks access, calls the Outline API to archive the document, and returns the document ID, title, archivedAt 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 'archive_document' tool input, requiring a documentId string.
    export const archiveDocumentSchema = z.object({ documentId });
  • src/lib/tools.ts:92-96 (registration)
    Tool registration in the allTools array using createTool, specifying name, description, and schema reference.
    createTool( 'archive_document', 'Archive a document.', 'archive_document' ),
  • Inclusion of the archive_document schema in the central toolSchemas map used for generating JSON schemas.
    archive_document: archiveDocumentSchema,
  • The toolSchemas object maps tool names to their Zod schemas, used in tool definition generation.
    archive_document: archiveDocumentSchema,

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