Skip to main content
Glama

delete_document

Remove documents from Outline wiki by deleting permanently or moving to trash. Specify document ID and choose deletion type for document management.

Instructions

Delete a document. If permanent=true, permanently delete; otherwise move to trash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
permanentNo

Implementation Reference

  • The main execution handler for the delete_document tool. It performs access check, calls the Outline API /documents.delete endpoint with documentId and permanent flag, and returns success response with message.
    async delete_document(args: DeleteDocumentInput) { checkAccess(config, 'delete_document'); await apiCall(() => apiClient.post('/documents.delete', { id: args.documentId, permanent: args.permanent }) ); return { success: true, documentId: args.documentId, permanent: args.permanent, message: args.permanent ? MESSAGES.DOCUMENT_DELETED_PERMANENT : MESSAGES.DOCUMENT_DELETED, }; },
  • Zod input schema definition for delete_document tool, requiring documentId and optional permanent boolean.
    export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
  • Tool registration in allTools array, creating the MCP tool definition with name, description, and JSON schema from Zod.
    createTool( 'delete_document', 'Delete a document. If permanent=true, permanently delete; otherwise move to trash.', 'delete_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