delete-entity
Deletes an existing element or relationship from a C4 diagram using project and diagram IDs plus either an element ID or relationship ID.
Instructions
Delete an existing element or relationship from the C4 diagram.
Required Input Fields:
- projectId: String (UUID from create-c4-project)
- diagramId: String (UUID from create-context-diagram)
Conditional Input Fields (ONE of the following is required):
- elementId: String (UUID of the element to delete)
- relationshipId: String (UUID of the relationship to delete)
You must provide either elementId OR relationshipId, but not both.
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.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>"
},
"name": "delete-entity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diagramId | Yes | UUID of the diagram from create-context-diagram | |
| elementId | No | UUID of the element to delete | |
| projectId | Yes | UUID of the project from create-c4-project | |
| relationshipId | No | UUID of the relationship to delete |