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
| Name | Required | Description | Default |
|---|---|---|---|
| documentIds | Yes | ||
| permanent | No |
Implementation Reference
- src/lib/handlers/batch.ts:117-132 (handler)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 }; }, - src/lib/schemas.ts:138-138 (schema)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) }); - src/lib/tools.ts:194-198 (registration)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' ), - src/lib/schemas.ts:242-242 (schema)Mapping of tool name 'batch_delete_documents' to its Zod schema in the central toolSchemas record.
batch_delete_documents: batchDeleteDocumentsSchema, - src/lib/access-control.ts:32-35 (helper)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',