delete_entities
Remove entities and their associated relationships from a knowledge graph stored in remote GitHub repositories to manage collaborative memory data.
Instructions
엔티티와 관련 관계를 삭제합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entityNames | Yes |
Implementation Reference
- src/index.ts:490-507 (handler)The primary handler for the 'delete_entities' MCP tool. It invokes the memory manager's deleteEntities method, performs synchronization if enabled, and returns a formatted success response.private async handleDeleteEntities(args: any) { this.memoryManager.deleteEntities(args.entityNames); const entityNames = args.entityNames.join(', '); const commitMessage = `feat: Delete ${args.entityNames.length} entities (${entityNames})`; await this.syncWithMessage(commitMessage); return { content: [{ type: 'text', text: JSON.stringify({ success: true, message: `Deleted entities: ${args.entityNames.join(', ')}`, deletedEntities: args.entityNames, }, null, 2), }], }; }
- src/index.ts:155-167 (registration)Registration of the 'delete_entities' tool in the MCP server, including name, Korean description, and input schema defining 'entityNames' as required array of strings.name: 'delete_entities', description: '엔티티와 관련 관계를 삭제합니다', inputSchema: { type: 'object', properties: { entityNames: { type: 'array', items: { type: 'string' }, }, }, required: ['entityNames'], }, },
- src/index.ts:158-166 (schema)Input schema for the 'delete_entities' tool, specifying an object with a required 'entityNames' property that is an array of strings.type: 'object', properties: { entityNames: { type: 'array', items: { type: 'string' }, }, }, required: ['entityNames'], },
- src/memory-graph.ts:82-92 (helper)Core implementation in MemoryGraph class: deletes specified entities from the graph and removes all relations connected to them, then updates metadata.deleteEntities(entityNames: string[]): void { entityNames.forEach(name => { this.graph.entities.delete(name); // 관련된 관계들도 삭제 this.graph.relations = this.graph.relations.filter( rel => rel.from !== name && rel.to !== name ); }); this.updateMetadata(); }