Skip to main content
Glama

batch_delete_documents

Remove 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 core handler function that performs batch deletion by calling the Outline API '/documents.delete' for each document ID, supports permanent deletion flag, uses runBatch helper for processing and error handling.
    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 input schema definition: requires array of documentIds (non-empty strings) and optional permanent boolean.
    export const batchDeleteDocumentsSchema = z.object({ documentIds, permanent: z.boolean().default(false) });
  • TypeScript type derived from the Zod schema for type safety in handlers.
    export type BatchDeleteDocumentsInput = z.infer<typeof batchDeleteDocumentsSchema>;
  • Registers the tool definition with name, description, and references the Zod schema for MCP tool advertisement.
    'batch_delete_documents', 'Delete multiple documents at once.', 'batch_delete_documents' ),
  • Includes the batch handlers (including batch_delete_documents) into the complete set of tool handlers via createAllHandlers.
    ...createBatchHandlers(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-smart-mcp'

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