Skip to main content
Glama
YeomYuJun

Remote Memory MCP Server

by YeomYuJun

delete_relations

Remove specific relationships between entities in a knowledge graph managed by the Remote Memory MCP Server. This tool deletes defined connections to maintain accurate data synchronization with GitHub repositories.

Instructions

특정 관계를 삭제합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationsYes

Implementation Reference

  • The main handler function for the 'delete_relations' tool. It calls the memory manager to delete the relations, optionally syncs to GitHub if autoPush is enabled, and returns a formatted 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), }], }; }
  • Core logic that implements relation deletion by filtering matching relations from the graph's relations array based on from, to, and relationType, then updates metadata.
    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(); }
  • src/index.ts:192-213 (registration)
    MCP tool registration defining the 'delete_relations' tool, including its name, description, and input schema for the relations array.
    { 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 structure of a Relation, used by the delete_relations tool.
    export interface Relation { from: string; to: string; relationType: string; createdAt: string; }

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