update-element
Update an existing C4 diagram element—such as a system, person, or external system—by changing its name, description, or type. Use it when modifying existing elements rather than creating new diagrams.
Instructions
Update an existing element in an existing C4 diagram. This tool should be used WHENEVER a user requests changes to existing elements rather than creating new diagrams.
Required Input Fields:
- projectId: String (UUID from create-c4-project)
- diagramId: String (UUID from create-context-diagram)
- elementId: String (UUID of the element to update)
Optional Input Fields:
- name: String (New name for the element)
- description: String (New description for the element)
- type: String (New type for the element, e.g., 'system', 'person', 'external-system')
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>",
"elementId": "<elementId>"
},
"name": "update-element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name for the element | |
| type | No | New type for the element | |
| diagramId | Yes | UUID of the diagram from create-context-diagram | |
| elementId | Yes | UUID of the element to update | |
| projectId | Yes | UUID of the project from create-c4-project | |
| description | No | New description for the element |