MCPcopy
hub / github.com/modelcontextprotocol/servers / deleteEntities

Method deleteEntities

src/memory/index.ts:154–159  ·  view source on GitHub ↗
(entityNames: string[])

Source from the content-addressed store, hash-verified

152 }
153
154 async deleteEntities(entityNames: string[]): Promise<void> {
155 const graph = await this.loadGraph();
156 graph.entities = graph.entities.filter(e => !entityNames.includes(e.name));
157 graph.relations = graph.relations.filter(r => !entityNames.includes(r.from) && !entityNames.includes(r.to));
158 await this.saveGraph(graph);
159 }
160
161 async deleteObservations(deletions: { entityName: string; observations: string[] }[]): Promise<void> {
162 const graph = await this.loadGraph();

Callers 2

index.tsFile · 0.80

Calls 2

loadGraphMethod · 0.95
saveGraphMethod · 0.95

Tested by

no test coverage detected