update-relationship
Modify an existing relationship in a C4 diagram by changing its source, target, description, or technology; use it when a user requests edits to an existing diagram.
Instructions
Update an existing relationship in an existing C4 diagram. This tool should be used WHENEVER a user requests changes to existing relationships rather than creating new diagrams.
Required Input Fields:
- projectId: String (UUID from create-c4-project)
- diagramId: String (UUID from create-context-diagram)
- relationshipId: String (UUID of the relationship to update)
Optional Input Fields:
- sourceId: String (UUID of the new source element)
- targetId: String (UUID of the new target element)
- description: String (New description for the relationship)
- technology: String (New technology used in the relationship)
The response will include unique IDs that you'll need for all subsequent operations,
as well as a state object that will direct you to the appropriate next step to take.
Response Fields:
- message: String (User-friendly message about the update)
- projectId: String (UUID of the project)
- elementIds: Object (Mappings of element UUIDs to their names)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": {
"projectId": "<projectId>",
"diagramId": "<diagramId>",
"relationshipId": "<relationshipId>"
},
"name": "update-relationship"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceId | No | UUID of the new source element | |
| targetId | No | UUID of the new target element | |
| diagramId | Yes | UUID of the diagram from create-context-diagram | |
| projectId | Yes | UUID of the project from create-c4-project | |
| technology | No | New technology used in the relationship | |
| description | No | New description for the relationship | |
| relationshipId | Yes | UUID of the relationship to update |