Skip to main content
Glama

update_relation

Destructive

Modifies one existing relation (the FK link between two entities), found by its id: cardinalityFrom (FK side), cardinalityTo (target side), label, onDelete, onUpdate, and the appearance: animated (true/false/null), color (ColorKey or null), strokeWidth (px or null), waypoints (manual bends, or null for automatic routing). Only the fields provided change; an explicit null clears label, onDelete, onUpdate and the appearance fields. The endpoints (fromCellId/fromFieldId/toCellId/toFieldId) are fixed: to re-point a relation, delete_relation then add_relation. update_field changes the FK column itself. Manual waypoints are absolute canvas points tied to the current geometry: a layout pass (auto_layout_mcd, auto_layout_canvas, or the tidy-up after add_entity without x/y, or after any write that makes an entity overlap another block, such as add_field / add_fields_batch) clears them for every relation. REFUSED with an error, nothing written, on an unknown id.

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": {
      "id": "<id>"
    },
    "name": "update_relation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID of the relation to modify (the id given to add_relation); its endpoints cannot be changed
colorNoColor of the stroke (ColorKey). null = default.
labelNoLabel of the relation; null clears it, omitted leaves it as is
animatedNoEnables/disables the animation. null = default of the type.
onDeleteNoON DELETE action carried by the DDL export; null clears it, omitted leaves it as is
onUpdateNoON UPDATE action carried by the DDL export; null clears it, omitted leaves it as is
waypointsNoManual bend points (canvas px). null = auto routing.
strokeWidthNoThickness in px (≈ 0.5 to 8). null = default.
cardinalityToNoNew cardinality on the target side
cardinalityFromNoNew cardinality on the source (FK) side
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. Changed6 schema fields changed
    • addedInput schema / properties / cardinalityFrom / description
      Added value: +"New cardinality on the source (FK) side"
    • addedInput schema / properties / cardinalityTo / description
      Added value: +"New cardinality on the target side"
    • addedInput schema / properties / id / description
      Added value: +"ID of the relation to modify (the id given to add_relation); its endpoints cannot be changed"
    • addedInput schema / properties / label / description
      Added value: +"Label of the relation; null clears it, omitted leaves it as is"
    • addedInput schema / properties / onDelete / description
      Added value: +"ON DELETE action carried by the DDL export; null clears it, omitted leaves it as is"
    • addedInput schema / properties / onUpdate / description
      Added value: +"ON UPDATE action carried by the DDL export; null clears it, omitted leaves it as is"
  4. Changed5 schema fields changed
    • changedInput schema / properties / animated / description
      Previous value: -"Active/désactive l'animation. null = défaut du type."New value: +"Enables/disables the animation. null = default of the type."
    • changedInput schema / properties / color / description
      Previous value: -"Couleur du trait (ColorKey). null = défaut."New value: +"Color of the stroke (ColorKey). null = default."
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / strokeWidth / description
      Previous value: -"Épaisseur en px (≈ 0.5 à 8). null = défaut."New value: +"Thickness in px (≈ 0.5 to 8). null = default."
    • changedInput schema / properties / waypoints / description
      Previous value: -"Points de coude manuels (px canvas). null = routage auto."New value: +"Manual bend points (canvas px). null = auto routing."
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds substantial behavior beyond that: partial-update semantics ('Only the fields provided change'), explicit-null clearing behavior, fixed endpoints, waypoint loss on layout passes, and refusal with an error and no write on uknown id. It stops short of describing the response payload, but the mutation and side-effect profile is unusually well disclosed.

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?

Front-loaded with the core action and mutation list before the caveats. It is dense and long for a single paragraph, with heavy parenthetical nesting, but nearly every clause carries operational information rather than filler.

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?

For an 11-parameter mutation with no output schema, the description covers the essential gaps: partial update semantics, null handling, immutability of endpoints, error behavior on unknown id, and the destructive side effect of waypoint clearing. No output schema exists, so return-value documentation is not owed.

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 coverage is 100%, so the baseline is 3; the description still adds meaning by naming which side cardinalityFrom (FK side) and cardinalityTo (target side) apply to, and by stating that waypoints are absolute canvas points tied to current geometry. The null-clears/omitted-preserves rule is consistent with the schema but restated usefully.

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?

Opens with a specific verb and resource ('Modifies one existing relation (the FK link between two entities)') and enumerates exactly which fields are mutable, so an agent knows the scope immediately. It also explicitly separates itself from update_field (which changes the FK column itself) and from delete_relation/add_relation (which re-point endpoints).

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?

Gives explicit routing rules: use delete_relation then add_relation to re-point, update_field to change the FK column, and this tool only for editing existing relation attributes. It also warns when manual waypoints are cleared by layout passes and write operations, which is exactly the kind of when-to-use/when-not context an agent needs.

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.