Skip to main content
Glama
C4 Diagram MCP Server

C4 Diagram MCP Server

by tarastclair

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

NameRequiredDescriptionDefault
nameNoNew name for the element
typeNoNew type for the element
diagramIdYesUUID of the diagram from create-context-diagram
elementIdYesUUID of the element to update
projectIdYesUUID of the project from create-c4-project
descriptionNoNew description for the element

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it discloses the mutation nature, the provenance of each required UUID, and that a "state object" drives the next step. However, it never states whether this is a partial update (do omitted fields such as description or type get cleared or retained?), nor anything about failure modes or permissions. There is also an internal inconsistency: a "state object" is promised in the prose but does not appear in the Response Fields list.

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 opening two sentences are well front-loaded and earn their place, but the bulk of the description is a field-by-field restatement of the input schema and a partial restatement of the response, which is redundant at 100% schema coverage. The response section is also incomplete rather than merely brief, listing elementIds but omitting the state object it advertises.

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

Completeness4/5

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

For a six-parameter mutation with no output schema, the definition supplies parameter provenance, response field descriptions, and next-step guidance, which covers most of what an agent needs. The remaining gap is partial-update semantics, which matters for a tool whose name and optional-field list imply that unspecified fields may be left untouched.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters, and the description's Required/Optional lists largely restate the schema text verbatim. The only added signal is the example type values, which also duplicate the enum. Baseline 3 is appropriate.

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?

"Update an existing element in an existing C4 diagram" gives a specific verb (update) and resource (C4 element), and the phrase "changes to existing elements rather than creating new diagrams" separates it from the create-* and add-element siblings without the agent needing another schema.

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?

The description states an explicit trigger ("WHENEVER a user requests changes to existing elements") and contrasts it with diagram creation, which is a usable when/when-not split. It stops short of naming the concrete alternatives (add-element, update-relationship) that an agent might otherwise reach for.

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