Files
outline/server/tools
Tom Moor cae8c78eb9 feat: Add delete_document and delete_collection MCP tools (#12245)
* feat: Add delete_document and delete_collection MCP tools

Adds MCP tools for deleting (or archiving) documents and collections.
Refactors Document#delete into destroyWithCtx and extracts collection
archive logic into Collection#archiveWithCtx so the same code paths can
be shared between the REST API and MCP entry points.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: Wrap MCP delete tools in DB transaction

Ensures delete/archive of documents and collections via MCP is atomic
and that row locks (transaction.LOCK.UPDATE) inside *WithCtx methods
actually apply, matching the pattern used by move_document.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: Clarify delete_collection MCP tool description

Reflects that collection deletion only soft-deletes non-archived
documents via the BeforeDestroy hook.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 12:29:22 -04:00
..
2026-02-16 20:14:18 -05:00
2026-03-20 09:45:50 -04:00

Tools are the building blocks of functionality for our internal MCP server.

Each tool is a self-contained unit of functionality that can be invoked by the MCP client to perform a specific task. To test the MCP with Claude in development make sure to run with the following command to ensure that the MCP server trusts the mkcert root CA certificate.

NODE_EXTRA_CA_CERTS=$(mkcert -CAROOT)/rootCA.pem claude