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

Method createEntities

src/memory/index.ts:119–125  ·  view source on GitHub ↗
(entities: Entity[])

Source from the content-addressed store, hash-verified

117 }
118
119 async createEntities(entities: Entity[]): Promise<Entity[]> {
120 const graph = await this.loadGraph();
121 const newEntities = entities.filter(e => !graph.entities.some(existingEntity => existingEntity.name === e.name));
122 graph.entities.push(...newEntities);
123 await this.saveGraph(graph);
124 return newEntities;
125 }
126
127 async createRelations(relations: Relation[]): Promise<Relation[]> {
128 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