Skip to main content
Glama

delete_relations

Remove specific relationships from a knowledge graph stored in a remote memory system. This tool deletes connections between entities to maintain accurate data structures for collaborative projects.

Instructions

특정 관계를 삭제합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationsYes

Implementation Reference

  • Core implementation of deleteRelations that removes matching relations from the graph by filtering the relations array based on from, to, and relationType.
    deleteRelations(relations: Relation[]): void { relations.forEach(targetRel => { this.graph.relations = this.graph.relations.filter( rel => !(rel.from === targetRel.from && rel.to === targetRel.to && rel.relationType === targetRel.relationType) ); }); this.updateMetadata(); }
  • MCP server handler for 'delete_relations' tool. Calls memoryManager.deleteRelations, optionally syncs to GitHub, and returns success response.
    private async handleDeleteRelations(args: any) { this.memoryManager.deleteRelations(args.relations); const commitMessage = `feat: Delete ${args.relations.length} relations`; await this.syncWithMessage(commitMessage); return { content: [{ type: 'text', text: JSON.stringify({ success: true, message: `Deleted ${args.relations.length} relations`, deletedRelations: args.relations, }, null, 2), }], }; }
  • src/index.ts:192-213 (registration)
    Registration of the 'delete_relations' tool in the MCP server's tool list, including name, description, and input schema definition.
    { name: 'delete_relations', description: '특정 관계를 삭제합니다', inputSchema: { type: 'object', properties: { relations: { type: 'array', items: { type: 'object', properties: { from: { type: 'string' }, to: { type: 'string' }, relationType: { type: 'string' }, }, required: ['from', 'to', 'relationType'], }, }, }, required: ['relations'], }, },
  • TypeScript interface defining the Relation type used by delete_relations for input validation and data structure.
    export interface Relation { from: string; to: string; relationType: string; createdAt: string; }
  • Switch case routing the 'delete_relations' tool call to the appropriate handler function.
    case 'delete_relations': return await this.handleDeleteRelations(args);

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