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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. 'Update existing edges' implies a mutation operation but doesn't disclose critical details: whether this requires specific permissions, if updates are atomic/batch, what happens on invalid inputs (e.g., non-existent edges), or error handling. It lacks transparency about side effects or system behavior beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with zero wasted words. It front-loads the core action and resource efficiently, making it easy to parse. Every word earns its place without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of updating graph edges (a mutation operation with no annotations or output schema), the description is incomplete. It doesn't address behavioral aspects like permissions, error handling, or return values, leaving significant gaps for an AI agent to operate safely and effectively. The high schema coverage helps but doesn't compensate for missing context on tool behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter semantics beyond what the schema already provides. Since schema description coverage is 100%, the baseline score is 3. The schema fully documents the 'edges' array parameter and its nested properties (e.g., edgeType, newEdgeType, weight range), so the description doesn't need to compensate but also adds no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and resource ('existing edges in the knowledge graph'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'update_*' tools (like update_nodes, update_artifact, etc.), which all follow the same 'update [resource]' pattern without specifying what makes edges unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., edges must exist), compare it to 'add_edges' or 'delete_edges', or indicate appropriate contexts for updating edges versus other graph operations. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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