Skip to main content
Glama

update_edges

Modify edge properties in a knowledge graph, including source, target, node types, and weights, to ensure accurate and updated relationships within MemoryMesh's data structure.

Instructions

Update existing edges in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesYesArray of edges to update

Implementation Reference

  • Executes the 'update_edges' tool logic by delegating to knowledgeGraphManager.updateEdges and returning a formatted tool response.
    case "update_edges": const updatedEdges = await this.knowledgeGraphManager.updateEdges(args.edges); return formatToolResponse({ data: {edges: updatedEdges}, actionTaken: "Updated edges in knowledge graph" });
  • Input schema definition for the 'update_edges' tool specifying the expected structure of edges to update.
    { name: "update_edges", description: "Update existing edges in the knowledge graph", inputSchema: { type: "object", properties: { edges: { type: "array", description: "Array of edges to update", items: { type: "object", description: "Edge to update", properties: { from: {type: "string", description: "Current source node name"}, to: {type: "string", description: "Current target node name"}, edgeType: {type: "string", description: "Current edge type"}, newFrom: {type: "string", description: "New source node name"}, newTo: {type: "string", description: "New target node name"}, newEdgeType: {type: "string", description: "New edge type"}, newWeight: { type: "number", description: "Optional new edge weight (0-1 range)", minimum: 0, maximum: 1 } }, required: ["from", "to", "edgeType"], }, }, }, required: ["edges"], }, },
  • Registers the static tools (including 'update_edges') from staticTools.ts into the central ToolsRegistry Map.
    // Register static tools allStaticTools.forEach(tool => { this.tools.set(tool.name, tool); });
  • Routes tool calls matching graph edge/node operations, including 'update_edges', to the GraphToolHandler instance.
    if (toolName.match(/^(add|update|delete)_(nodes|edges)$/)) { return this.graphHandler;
  • Instantiates the GraphToolHandler which handles 'update_edges' during factory initialization.
    this.graphHandler = new GraphToolHandler(knowledgeGraphManager);

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/CheMiguel23/MemoryMesh'

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