1.4 KiB
1.4 KiB
Why
LLMs using the KB MCP server can create notes in collections and search by collection, but cannot assign existing documents to a collection or delete documents. This forces users to drop out to the HTTP API for routine document management. Both operations are fully supported at the database and HTTP API layers but aren't wired through to MCP tools.
What Changes
- Add
kb_set_collectionMCP tool — assigns, changes, or removes the collection on an existing document by manipulatingcollection:prefixed tags via the existingengine.update_tags()method. - Add
kb_deleteMCP tool — deletes a document by ID, calling the existingDELETE /api/v1/documents/{doc_id}endpoint via a newengine.delete_document()method.
Capabilities
New Capabilities
mcp-document-management: MCP tools for modifying and deleting existing documents (kb_set_collection, kb_delete).
Modified Capabilities
(none — the engine API endpoints already exist; this change only adds MCP tool wrappers)
Impact
- MCP server (
mcp/server.py): Two new tool registrations. - MCP engine client (
mcp/engine.py): One new method (delete_document). Theupdate_tagsmethod already exists and will be reused. - Engine API: No changes —
DELETE /api/v1/documents/{doc_id}andPUT /api/v1/documents/{doc_id}/tagsalready exist. - Breaking changes: None. Additive only.