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
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Array 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"], }, },
- src/integration/tools/registry/toolsRegistry.ts:42-45 (registration)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); });
- src/integration/tools/handlers/ToolHandlerFactory.ts:43-44 (registration)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;
- src/integration/tools/handlers/ToolHandlerFactory.ts:26-26 (registration)Instantiates the GraphToolHandler which handles 'update_edges' during factory initialization.this.graphHandler = new GraphToolHandler(knowledgeGraphManager);