Skip to main content
Glama

batch_delete_documents

Delete multiple Outline wiki documents simultaneously to manage content efficiently. Specify document IDs and choose permanent deletion when needed.

Instructions

Delete multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes
permanentNo

Implementation Reference

  • The primary handler function that executes the batch deletion by calling the Outline API's /documents.delete endpoint for each document ID in the input array, handling errors and returning a batch summary with success/failure counts and details. Supports permanent deletion flag.
    async batch_delete_documents(args: BatchDeleteDocumentsInput) { checkAccess(config, 'batch_delete_documents'); const results = await runBatch(args.documentIds, async (documentId) => { try { await apiCall(() => apiClient.post('/documents.delete', { id: documentId, permanent: args.permanent }) ); return { success: true, documentId }; } catch (error) { return { success: false, documentId, error: getErrorMessage(error) }; } }); return { ...results, permanent: args.permanent }; },
  • Zod schema defining the input for batch_delete_documents: an array of documentIds (required) and permanent boolean (optional, defaults to false).
    export const batchDeleteDocumentsSchema = z.object({ documentIds, permanent: z.boolean().default(false) });
  • Registration of the batch_delete_documents tool in the allTools array, providing name, description, and schema reference for MCP tool definition.
    'batch_delete_documents', 'Delete multiple documents at once.', 'batch_delete_documents' ),
  • Mapping of tool name 'batch_delete_documents' to its Zod schema in the central toolSchemas record.
    batch_delete_documents: batchDeleteDocumentsSchema,
  • Access control helper that includes 'batch_delete_documents' in the set of delete tools, used to enforce restrictions if DISABLE_DELETE is enabled.
    const DELETE_TOOLS = new Set([ 'delete_document', 'delete_collection', '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-wiki-mcp'

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