MCP Tools for C4 Diagrams
Section titled “ MCP Tools for C4 Diagrams”The C4 Diagrams group lets an AI assistant review your C4 Diagram Sets and C4 Diagrams and work on them: find missing diagrams, check coverage, and add or change nodes, boundaries, and connectors. It is the only group of the MCP Endpoint whose delete tools are permanent.
- ✅ 38 tools: 15 read, 18 write, 5 delete
- ✅ Coverage, impact, and missing-diagram reviews of a whole set
- ✅ Two scopes for changes: one to create, one to modify and delete

Animated walkthrough: the AI Assistant answers a question about a C4 diagram with the C4 Diagram tools (c4_list_sets, c4_list_diagrams, explain_c4_diagram_context), after C4 Diagrams was ticked and two default groups unticked to stay under the limit. The model writes the answer itself, so its wording changes from run to run; the facts come from the diagram.
- Open the AI Assistant and click Tools.
- Tick C4 Diagrams, and untick Documentation and Log Views to stay under 128 tools.
- Back in the conversation, ask: In the C4 Diagram Set Order-to-Cash Demo, what does the L2 container diagram Portal — L2 Container Diagram contain?
- The model finds the set and the diagram with
c4_list_setsandc4_list_diagrams, and reads the diagram withexplain_c4_diagram_context. - The answer lists the Portal's four Services as containers, the Person Customer and the System ERP outside the boundary, and the flows between them with their Message Types. This diagram is the imported example, which the generator kept, so it has a Person; a generated Container diagram, such as ERP — Containers, has none. The chat shows only the answer, not the tools the model called.
The group is not selected by default in the AI Assistant: with the default groups it goes over the limit of 128 tools per request, so you untick other tools first (Choose Your Tools). The MCP Tool Reference explains the OAuth scopes, the paging rules, and the other groups.
Understanding the Scopes in This Group
Section titled “ Understanding the Scopes in This Group”| Scope | Tools |
|---|---|
mcp:repository.read |
The 15 read tools |
mcp:c4diagrams.create |
c4_create_set, c4_create_diagram, c4_clone_diagram |
mcp:c4diagrams.modify |
The other 20 write and delete tools |
c4_list_diagrams and c4_list_sets return 25 items by default, at most 200.
Review Tools (15)
Section titled “ Review Tools (15)”| Tool | What it does |
|---|---|
c4_get_diagram_custom_metadata |
The Custom Metadata values attached to a C4 diagram |
c4_get_diagram_header |
The raw model of one C4 diagram |
c4_get_diagram_tags |
The Tags attached to a C4 diagram |
c4_get_set |
One C4 Diagram Set by its id |
c4_list_available_custom_metadata_definitions |
The Custom Metadata definitions available to C4 diagrams |
c4_list_diagrams |
C4 diagram headers, to support write workflows |
c4_list_sets |
C4 Diagram Sets |
compare_c4_diagrams_by_scope |
Compares the diagrams in a set by scope, grouped by System. New 7.12 The scope is always a System; a Service scope exists only on diagrams made before 7.12 |
explain_c4_diagram_context |
One diagram explained: structure, set membership, scope, and improvement suggestions. New 7.12 On a Dynamic diagram it also returns DynamicSteps: each step's resolution against the Transport Contracts of its ends, and the step issues (an internal System participant, an unbound participant, or a Message Type in no contract of its ends) |
get_c4_diagram_coverage_matrix |
The coverage matrix of a set, per element and rule |
get_c4_diagram_entity_usage |
Which entities are used across all diagrams in a set |
get_c4_diagram_set_overview |
A set's diagrams with coverage and suggestion summaries |
get_c4_impact_review |
The impact records of a set |
get_c4_missing_diagram_candidates |
Diagrams that may be missing from a set |
get_c4_related_entity_candidates |
Related entities that could be added to a diagram |
Create and Change Tools (18)
Section titled “ Create and Change Tools (18)”| Tool | Scope | What it does |
|---|---|---|
c4_create_set |
create | Creates a C4 Diagram Set |
c4_create_diagram |
create | Creates a C4 diagram header. New 7.12 The scope type is 1 (System) only, and none on a System Landscape; the optional subjectEntityType (2 Service, 4 Contract) and subjectEntityId set a Component diagram's subject. Every save is checked against the C4 model rules |
c4_clone_diagram |
create | Clones a diagram into the same set, with its boundaries, nodes, connectors, and outgoing manual links; Tags and Custom Metadata are not copied. New 7.12 Refuses newDiagramState 1 (Active): a clone is a Draft |
c4_add_boundary |
modify | Adds a boundary to a diagram |
c4_add_connector |
modify | Adds a connector to a diagram |
c4_add_node |
modify | Adds a node to a diagram. New 7.12 repositoryEntityType 6 is an Endpoint, for a Component on a Component diagram only; a binding the rules refuse is rejected with the rule's message |
c4_add_diagram_tag |
modify | Attaches an existing Tag to a diagram |
c4_attach_custom_metadata |
modify | Attaches an existing Custom Metadata value to a diagram |
c4_detach_custom_metadata |
modify | Unlinks a Custom Metadata value from a diagram; the definition stays |
c4_link_article_to_node |
modify | Links an Article, Snippet, or Template, by slug, to a node |
c4_promote_diagram |
modify | Promotes a Draft diagram to Active. It replaces the diagram the Draft was cloned from and, except on a Dynamic diagram, the Active one of the same set, type, scope, subject, and mode |
c4_remove_diagram_tag |
modify | Unlinks a Tag from a diagram; the Tag stays |
c4_replace_diagram_tags |
modify | Replaces a diagram's whole Tag list in one step |
c4_update_boundary |
modify | Updates selected fields of a boundary |
c4_update_connector |
modify | Updates selected fields of a connector |
c4_update_diagram |
modify | Updates a diagram header |
c4_update_node |
modify | Updates selected fields of a node; the same binding rules as c4_add_node |
c4_update_set |
modify | Changes a set's name or description |
Delete Tools (5)
Section titled “ Delete Tools (5)”All five need mcp:c4diagrams.modify and are permanent.
| Tool | What it deletes |
|---|---|
c4_delete_boundary |
A boundary from a diagram |
c4_delete_connector |
A connector from a diagram |
c4_delete_node |
A node from a diagram |
c4_delete_diagram |
A diagram, with all its boundaries, nodes, and connectors |
c4_delete_set |
A C4 Diagram Set |
Next Steps
Section titled “ Next Steps”- MCP Tool Reference - Scopes, paging rules, and the other groups
- Choose Your Tools - Make room for this group within 128 tools
Related Topics
Section titled “ Related Topics”- Architecture Diagrams - C4 Diagram Sets and C4 Diagrams
- Documentation Tools - Document a C4 node
- BizTalk Tools - Generate Mermaid C4 from a BizTalk application
- Repository Tools
- AI Assistant