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.

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 targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. 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."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description adds substantial behavioral detail beyond that: explicit null clears fields, endpoints cannot be changed, manual waypoints are absolute and cleared by layout passes, and an unknown id is refused with nothing written. These are meaningful consequences for a mutation tool, not repetition of annotations.

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?

The purpose and main contract are front-loaded, and every sentence carries usable information about mutation, null-clearing, fixed endpoints, waypoints, or errors. It is a dense single paragraph, so scanability is slightly reduced, but there is little or no wasted text.

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 destructive mutation with full schema coverage and annotations, the description is complete enough: it explains the patch model, null semantics, immutable endpoints, alternative tools, waypoint invalidation, and the unknown-id failure mode. No output schema exists, so the description does not need to explain return values.

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, but the description adds global patch semantics ('Only the fields provided change') and a waypoint lifecycle rule that the schema does not fully convey: layout passes clear manual waypoints tied to current geometry. It does not cover expectedProjectId explicitly, but the schema already documents it.

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?

States a specific verb and resource, 'Modifies one existing relation ... found by its id', and immediately scopes what can change (cardinality, label, referential actions, appearance). It clearly distinguishes itself from add_relation/delete_relation by noting endpoints are fixed and from update_field by noting that update_field changes the FK column itself.

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 guidance: to re-point a relation, use delete_relation then add_relation; to change the FK column, use update_field. It also states the mutation contract that only provided fields change and explicit null clears selected fields, so the agent knows when and how to invoke it.

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.