MCPcopy
hub / github.com/safishamsi/graphify / delete_record

Function delete_record

worked/example/raw/storage.py:74–84  ·  view source on GitHub ↗

Remove a document and its index entry. Returns True if it existed.

(record_id: str)

Source from the content-addressed store, hash-verified

72
73
74def delete_record(record_id: str) -> bool:
75 """Remove a document and its index entry. Returns True if it existed."""
76 _ensure_storage()
77 path = STORAGE_DIR / f"{record_id}.json"
78 if not path.exists():
79 return False
80 path.unlink()
81 index = load_index()
82 index.pop(record_id, None)
83 save_index(index)
84 return True
85
86
87def list_records() -> list:

Callers 1

handle_deleteFunction · 0.90

Calls 3

_ensure_storageFunction · 0.85
load_indexFunction · 0.85
save_indexFunction · 0.85

Tested by

no test coverage detected