Skip to main content
Glama

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
NameRequiredDescriptionDefault
entityNamesYes

Implementation Reference

  • 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'], }, },
  • 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'], },
  • 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(); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YeomYuJun/remote-memory-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server