Skip to main content
Glama
C4 Diagram MCP Server

C4 Diagram MCP Server

by tarastclair

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

NameRequiredDescriptionDefault
diagramIdYesUUID of the diagram from create-context-diagram
elementIdNoUUID of the element to delete
projectIdYesUUID of the project from create-c4-project
relationshipIdNoUUID of the relationship to delete

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden; it discloses that a state object in the response directs the next step, which is useful beyond what the schema shows. However, for a destructive operation it says nothing about irreversibility, permission requirements, or whether deleting an element cascades to attached relationships.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The labeling is front-loaded and scannable, but the closing sentence about unique IDs needed for subsequent operations is boilerplate that does not apply cleanly to a deletion, and the field lists mostly repeat the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the definition covers inputs and the exclusive-or rule but leaves side effects, failure modes and irreversibility unaddressed. The response-shape hint partly compensates but does not close the gap.

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 already 100%, but the description adds a constraint the schema cannot express: exactly one of elementId or relationshipId must be supplied, not both. That exclusive-or rule is real value beyond the parameter descriptions.

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 (delete) and the two resource types it can remove (element or relationship) from the C4 diagram, which cleanly separates it from add-element, update-element and add-relationship.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete preconditions — projectId from create-c4-project and diagramId from create-context-diagram — and enforces the one-of choice between elementId and relationshipId. It does not say when to prefer delete over update-element, so the alternative routing is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.