Skip to main content
Glama

Update edges

canvas_update_edges
DestructiveIdempotent

When: Use to relabel, retype, restyle (dashed, colour), reverse, put arrowheads on both ends, or re-point an existing edge, instead of disconnecting and reconnecting it.

Change existing connections in place: relabel, retype, restyle (solid/dashed/dotted, colour), reverse the direction, put arrowheads on both ends, or re-point one end to another node. Identify each edge by source and target, or by edge (an id or "Source -> Target"). Change only the edges the user asked about: a request and its response are two edges on purpose, never merge them into one two-headed edge to tidy the drawing.

Batch: updates (up to 60) takes a list; put every item in one call rather than one call per item.

Operates on one Datadef diagram, named by diagram_id.

Returns compact JSON: the ids it created, changed or removed, the diagram revision, a one-line summary and the next step. A viewer-role account is refused.

Next: canvas_view to check the result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "diagram_id": "<diagram_id>",
      "updates": "<updates>"
    },
    "name": "canvas_update_edges"
  }
}

Input Schema

NameRequiredDescriptionDefault
updatesYes
diagram_idYesDiagram id, from list_diagrams, create_diagram or create_blank_diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / diagram_id / description
      Previous value: -"Canvas id, from list_diagrams, create_diagram, or create_blank_diagram."New value: +"Diagram id, from list_diagrams, create_diagram or create_blank_diagram."
    • addedInput schema / properties / updates / items / properties / bidirectional
      Added value: +{
      +  "description": "true = arrowheads on both ends of this one edge (a genuinely two-way link); false = only at the target.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / updates / items / properties / color
      Added value: +{
      +  "description": "Colour name or hex; \"default\" returns to the source node's hue.",
      +  "type": "string"
      +}
    • addedInput schema / properties / updates / items / properties / edge
      Added value: +{
      +  "description": "Edge id, or \"Source -> Target\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / updates / items / properties / newSource
      Added value: +{
      +  "description": "Re-point the edge to start at this node.",
      +  "type": "string"
      +}
    • addedInput schema / properties / updates / items / properties / newTarget
      Added value: +{
      +  "description": "Re-point the edge to end at this node.",
      +  "type": "string"
      +}
    • addedInput schema / properties / updates / items / properties / removeLabel
      Added value: +{
      +  "description": "Remove the label.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / updates / items / properties / reverse
      Added value: +{
      +  "description": "Swap source and target: the arrow points the other way.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / updates / items / properties / source / description
      Previous value: -"Source node id or label."New value: +"Current source node id or label."
    • changedInput schema / properties / updates / items / properties / target / description
      Previous value: -"Target node id or label."New value: +"Current target node id or label."
    • removedInput schema / properties / updates / items / required
      Removed value: -[
      -  "source",
      -  "target"
      -]
    • changedInput schema / properties / updates / maxItems
      Previous value: -40New value: +60
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive/idempotent/readOnly flags, and the description adds genuinely new context: a viewer-role account is refused (auth requirement), the 60-item batch cap, and the shape of the returned JSON. It does not say what prior styling or labels are lost on an in-place update, which is the one behavioral gap given destructiveHint=true.

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

Conciseness4/5

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

Well front-loaded with a When/Change/Batch/Returns/Next structure, and the key routing advice is in the first sentence. It is somewhat repetitive, listing the same operation set twice (once in 'When:', again in 'Change existing connections'), which costs a little density.

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

Completeness5/5

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

With no output schema, the description still describes the return payload (ids created/changed/removed, revision, one-line summary, next step) and the suggested follow-up (canvas_view). Auth restrictions and batch limits are covered, so an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema description coverage is only 50%, but the description compensates by explaining edge identification ('by source and target, or by `edge` (an id or "Source -> Target")') and by spelling out the semantics of reverse, bidirectional, and re-pointing. The enum-style values for type and style are left to the schema, which is reasonable.

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

Purpose5/5

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

The description states a specific verb and resource (update existing edges in place) and enumerates the exact operations available: relabel, retype, restyle, reverse, arrowheads, re-point. It also distinguishes itself from the disconnect/reconnect siblings by name ('instead of disconnecting and reconnecting it').

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

Usage Guidelines5/5

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

Opens with an explicit 'When:' clause naming the alternative approach it replaces (disconnect + reconnect), gives batch guidance ('put every item in one call rather than one call per item'), and adds a scoping rule ('change only the edges the user asked about'). Nothing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources