remove_document
Remove a document from the knowledge base index. Optionally delete the file from disk permanently by setting delete_file=True.
Instructions
Remove a document from the knowledge base index.
Mutating — removes index entries. If delete_file=True, also permanently deletes the file from disk (irreversible, cannot be undone).
Args: filepath: Path to the document file. Must be an indexed document — use list_documents() to find valid paths. delete_file: If True, permanently deletes the file from disk in addition to removing from the index (default: False).
Returns: JSON string with removal results (filepath, status).
Usage: Use to unindex a document while keeping the file on disk (default). Set delete_file=True only for permanent removal. Use update_document() to replace content instead of removing. Use reindex_documents(force=True) if you deleted the file manually on disk outside of this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | ||
| delete_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |