delete_document
Remove documents from Outline wiki by deleting permanently or moving to trash. Specify document ID and choose deletion type for document management.
Instructions
Delete a document. If permanent=true, permanently delete; otherwise move to trash.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | ||
| permanent | No |
Implementation Reference
- src/lib/handlers/documents.ts:124-135 (handler)The main execution handler for the delete_document tool. It performs access check, calls the Outline API /documents.delete endpoint with documentId and permanent flag, and returns success response with message.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, }; },
- src/lib/schemas.ts:69-69 (schema)Zod input schema definition for delete_document tool, requiring documentId and optional permanent boolean.export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
- src/lib/tools.ts:102-106 (registration)Tool registration in allTools array, creating the MCP tool definition with name, description, and JSON schema from Zod.createTool( 'delete_document', 'Delete a document. If permanent=true, permanently delete; otherwise move to trash.', 'delete_document' ),