Skip to main content
Glama

delete_document

Remove documents from Outline wiki by deleting them permanently or moving to trash. Specify document ID and choose deletion method.

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 implements the delete_document tool logic. It performs access check and calls the Outline API to delete the document, either permanently or to trash.
    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 schema defining the input for delete_document tool: documentId (string) and optional permanent (boolean, default false).
    export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
  • Registration of the delete_document tool definition, including name, description, and reference to its input schema.
    createTool( 'delete_document', 'Delete a document. If permanent=true, permanently delete; otherwise move to trash.', 'delete_document' ),
  • Inclusion of delete_document schema in the central toolSchemas map used for tool definitions.
    delete_document: deleteDocumentSchema,
  • Composition of document handlers (including delete_document) into the all handlers object.
    ...createDocumentHandlers(ctx),

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-wiki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server