delete_entities
Remove entities and their associated relationships from the knowledge graph to maintain data accuracy and manage remote memory storage.
Instructions
엔티티와 관련 관계를 삭제합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entityNames | Yes |
Implementation Reference
- src/memory-graph.ts:82-92 (handler)Core handler function in MemoryGraphManager that deletes the specified entities and all related relations from the graph, 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(); }
- src/index.ts:490-507 (handler)MCP server tool handler for 'delete_entities' that invokes the core deleteEntities on memoryManager, performs optional sync/push, and returns 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:154-167 (registration)Tool registration in MCP server's listTools handler, defining name, description, and input schema for delete_entities.{ name: 'delete_entities', description: '엔티티와 관련 관계를 삭제합니다', inputSchema: { type: 'object', properties: { entityNames: { type: 'array', items: { type: 'string' }, }, }, required: ['entityNames'], }, },
- src/index.ts:157-166 (schema)Input schema definition for the delete_entities tool, specifying entityNames as required array of strings.inputSchema: { type: 'object', properties: { entityNames: { type: 'array', items: { type: 'string' }, }, }, required: ['entityNames'], },
- src/index.ts:386-387 (handler)Dispatch case in the main CallToolRequestSchema handler that routes to the specific delete_entities handler.case 'delete_entities': return await this.handleDeleteEntities(args);