Skip to main content
Glama

delete_document

Remove documents from Outline wiki by deleting permanently or moving to trash, based on specified parameters.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
permanentNo

Implementation Reference

  • The core handler function that executes the delete_document tool logic by invoking the Outline API to delete the specified document, optionally permanently.
    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 for the delete_document tool defining documentId (required string) and permanent (optional boolean, defaults to false).
    export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
  • Registers the MCP tool definition for delete_document, including name, description, and JSON schema derived from Zod schema.
    'delete_document', 'Delete a document. If permanent=true, permanently delete; otherwise move to trash.', 'delete_document' ),
  • Combines and registers all handlers, including the document handlers (which contain delete_document) into a single ToolHandlers object.
    export function createAllHandlers(ctx: AppContext): ToolHandlers { return { ...createSearchHandlers(ctx), ...createDocumentHandlers(ctx), ...createCollectionHandlers(ctx), ...createCommentHandlers(ctx), ...createBatchHandlers(ctx), ...createSmartHandlers(ctx), } as ToolHandlers; }
  • Includes 'delete_document' in the DELETE_TOOLS set used for access control checks to enforce delete restrictions.
    '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