delete_entities, delete_observations and delete_relations return success: true with a hardcoded message regardless of what matched.
src/memory/index.ts:
async deleteEntities(entityNames: string[]): Promise<void> {
const graph = await this.loadGraph();
graph.entities = graph.entities.filter(e => !entityNames.includes(e.name));
structuredContent: { success: true, message: "Entities deleted successfully" }
The method returns void, so the handler never learns whether a name existed. A call naming an entity that is not in the graph reports the same success as one that deleted something.
Reproduction, against the real KnowledgeGraphManager:
await manager.createEntities([{ name: "Alice", entityType: "person", observations: [] }]);
await callTool("delete_entities", { entityNames: ["Alise"] });
// → { success: true, message: "Entities deleted successfully" }
// Alice is still in the graph.
Same for delete_observations with an entity or observation that is absent, and delete_relations with a relation that matches nothing.
addObservations at line 167 throws Entity with name ${o.entityName} not found for the same condition, so the two paths in this file answer differently.
README.md documents the tools as silent when a target is missing, so not throwing looks intentional. The response claiming a deletion that did not occur is the part that appears unintended.
delete_entities,delete_observationsanddelete_relationsreturnsuccess: truewith a hardcoded message regardless of what matched.src/memory/index.ts:The method returns
void, so the handler never learns whether a name existed. A call naming an entity that is not in the graph reports the same success as one that deleted something.Reproduction, against the real
KnowledgeGraphManager:Same for
delete_observationswith an entity or observation that is absent, anddelete_relationswith a relation that matches nothing.addObservationsat line 167 throwsEntity with name ${o.entityName} not foundfor the same condition, so the two paths in this file answer differently.README.mddocuments the tools as silent when a target is missing, so not throwing looks intentional. The response claiming a deletion that did not occur is the part that appears unintended.