remove_library_item
Remove a library item from the Metis index. Optionally delete the file from disk, with safety checks to ensure only files inside the PKM root can be removed.
Instructions
Remove a library item from the Metis index, optionally deleting the file.
De-indexes a paper or document by deleting its row from library_seeded. By
default the file on disk is left untouched (index-only removal); set
delete_file=True to also delete the file, which is guarded so only paths
inside the PKM root can be removed. To hide rather than remove an item, use
archive_library_item instead.
Args:
relative_path: The relative_path primary key identifying the row in the
library_seeded table.
delete_file: If True, also delete the underlying file from disk (subject
to the within-PKM-root safety check); if False (default), only the
index row is removed.
Returns:
A confirmation message of what was removed, or a not-found / error
message if the item or table is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| relative_path | Yes | ||
| delete_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |