---
title: "MCP Tools for C4 Diagrams: Review, Create, Change, and Delete"
description: "Every Nodinite MCP Endpoint tool in the C4 Diagrams group: 38 tools to review C4 Diagram Sets and their coverage, and to create, change, and permanently delete sets, diagrams, nodes, boundaries, and connectors, with the OAuth scopes they need."
---

# :fa-diagram-project: MCP Tools for C4 Diagrams

The C4 Diagrams group lets an AI assistant review your [C4 Diagram Sets and C4 Diagrams][Architecture 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  

![The AI Assistant, Ready with Azure OpenAI gpt-5.4-mini, Tools with C4 Diagrams ticked and Documentation and Log Views unticked, 125 of 180 selected, asked what the L2 container diagram Portal — L2 Container Diagram in the C4 Diagram Set Order-to-Cash Demo contains, answering with the scope Portal, six nodes (Customer, ERP and Portal's four INT1337 Services) and seven Flows, animated walkthrough (7.12)][1]  
*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.*  

1. Open the [AI Assistant][] and click **Tools**.
2. Tick **C4 Diagrams**, and untick **Documentation** and [Log Views][] to stay under 128 tools.
3. 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?*
4. The model finds the set and the diagram with `c4_list_sets` and `c4_list_diagrams`, and reads the diagram with `explain_c4_diagram_context`.
5. 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][MCP Choose Tools]). The [MCP Tool Reference][] explains the OAuth scopes, the paging rules, and the other groups.

## :fa-key: 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 |

>[!WARNING]
>`c4_delete_diagram` permanently deletes a diagram with all its boundaries, nodes, and connectors, and `c4_delete_set` permanently deletes a set. Neither can be undone. Grant `mcp:c4diagrams.modify` only to users who may do that. `c4_detach_custom_metadata`, `c4_remove_diagram_tag`, and `c4_replace_diagram_tags` remove or overwrite links too; they are flagged as destructive, so an MCP client such as VS Code may ask you to confirm before it runs them.

`c4_list_diagrams` and `c4_list_sets` return 25 items by default, at most 200.

## :fa-magnifying-glass-chart: 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 Diagrams] |
| `c4_get_diagram_tags` | The [Tags][] attached to a C4 diagram |
| `c4_get_set` | One [C4 Diagram Set][C4 Diagram Sets] by its id |
| `c4_list_available_custom_metadata_definitions` | The [Custom Metadata][] definitions available to C4 diagrams |
| `c4_list_diagrams` | [C4 diagram][C4 Diagrams] 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][Systems]. :new7.12: The scope is always a System; a [Service][Services] scope exists only on diagrams made before 7.12 |
| `explain_c4_diagram_context` | One diagram explained: structure, set membership, scope, and improvement suggestions. :new7.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][Coverage Matrix] of a set, per element and rule |
| `get_c4_diagram_entity_usage` | Which entities are used across all diagrams in a [set][C4 Diagram Sets] |
| `get_c4_diagram_set_overview` | A [set][C4 Diagram Sets]'s diagrams with coverage and suggestion summaries |
| `get_c4_impact_review` | The [impact records][Diagram Assistance - Review Impacts] of a set |
| `get_c4_missing_diagram_candidates` | Diagrams that may be missing from a [set][C4 Diagram Sets] |
| `get_c4_related_entity_candidates` | Related entities that could be added to a [diagram][C4 Diagrams] |

## :fa-pen-ruler: Create and Change Tools (18)

| Tool | Scope | What it does |
| --- | --- | --- |
| `c4_create_set` | create | Creates a [C4 Diagram Set][C4 Diagram Sets] |
| `c4_create_diagram` | create | Creates a C4 diagram header. :new7.12: The scope type is 1 (System) only, and none on a System Landscape; the optional `subjectEntityType` (2 Service, 4 [Contract][Contracts]) and `subjectEntityId` set a Component diagram's subject. Every save is checked against the [C4 model rules][C4 Concept Mapping] |
| `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. :new7.12: Refuses `newDiagramState` 1 (Active): a clone is a [Draft][Clone as Draft] |
| `c4_add_boundary` | modify | Adds a [boundary][C4 Boundaries] to a diagram |
| `c4_add_connector` | modify | Adds a [connector][C4 Connectors] to a diagram |
| `c4_add_node` | modify | Adds a node to a diagram. :new7.12: `repositoryEntityType` 6 is an [Endpoint][Endpoints], 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][Tags] 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][Articles], [Snippet][Snippets], or [Template][Templates], by slug, to a node |
| `c4_promote_diagram` | modify | [Promotes a Draft][Promoting a Draft to Active] 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][Tags] from a diagram; the Tag stays |
| `c4_replace_diagram_tags` | modify | Replaces a diagram's whole [Tag][Tags] list in one step |
| `c4_update_boundary` | modify | Updates selected fields of a [boundary][C4 Boundaries] |
| `c4_update_connector` | modify | Updates selected fields of a [connector][C4 Connectors] |
| `c4_update_diagram` | modify | Updates a [diagram][C4 Diagrams] header |
| `c4_update_node` | modify | Updates selected fields of a node; the same [binding rules][C4 Concept Mapping] as `c4_add_node` |
| `c4_update_set` | modify | Changes a [set][C4 Diagram Sets]'s name or description |

## :fa-trash-can: 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 |

## :fa-hand-point-right: Next Steps

* :fa-book: [MCP Tool Reference][] - Scopes, paging rules, and the other groups  
* :fa-list-check: [Choose Your Tools][MCP Choose Tools] - Make room for this group within 128 tools  

## :fa-link-horizontal: Related Topics

* :fa-diagram-project: [Architecture Diagrams][] - C4 Diagram Sets and C4 Diagrams  
* :fa-file-lines: [Documentation Tools][] - Document a C4 node  
* :fa-server: [BizTalk Tools][] - Generate Mermaid C4 from a BizTalk application  
* :fa-sitemap: [Repository Tools][]  
* :fa-robot: [AI Assistant][]  

[1]:{ndm}/Documentation%20Pictures/IM/AI/MCP_C4Tools_InUse.gif

[AI Assistant]:{ndr}/AI/AI%20Assistant.md
[Architecture Diagrams]:{ndr}/Repository%20Model/C4%20Diagrams/Overview.md
[Articles]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Overview.md
[BizTalk Tools]:{ndr}/AI/MCP%20Tool%20Reference/BizTalk%20Tools.md
[C4 Boundaries]:{ndr}/Repository%20Model/C4%20Diagrams/Features/Shapes%20and%20Toolbox.md#fa-object-group-boundaries
[C4 Concept Mapping]:{ndr}/Repository%20Model/C4%20Diagrams/Troubleshooting/C4%20Model%20vs%20Nodinite%20Concept%20Mapping.md
[C4 Connectors]:{ndr}/Repository%20Model/C4%20Diagrams/Features/Shapes%20and%20Toolbox.md#fa-arrow-right-arrow-left-connectors
[C4 Diagram Sets]:{ndr}/Administration/4.%20Customize/6.%20C4%20Diagram%20Sets/Overview.md
[C4 Diagrams]:{ndr}/Repository%20Model/C4%20Diagrams/Overview.md
[Clone as Draft]:{ndr}/Repository%20Model/C4%20Diagrams/Designer/Diagram%20Lifecycle.md#clone-as-draft
[Contracts]:{ndr}/Getting%20Started/4.%20Repository/Contracts/Overview.md
[Coverage Matrix]:{ndr}/Repository%20Model/C4%20Diagrams/Features/Diagram%20Set%20Fundamentals.md#coverage-matrix
[Custom Metadata]:{ndr}/Repository%20Model/Custom%20Metadata/Overview.md
[Diagram Assistance - Review Impacts]:{ndr}/Repository%20Model/C4%20Diagrams/Features/Diagram%20Assistance.md#review-impacts
[Documentation Tools]:{ndr}/AI/MCP%20Tool%20Reference/Documentation%20Tools.md
[Endpoints]:{ndr}/Repository%20Model/Endpoints/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[MCP Choose Tools]:{ndr}/AI/MCP%20Endpoint.md#choose-tools
[MCP Endpoint]:{ndr}/AI/MCP%20Endpoint.md
[MCP Tool Reference]:{ndr}/AI/MCP%20Tool%20Reference.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Promoting a Draft to Active]:{ndr}/Repository%20Model/C4%20Diagrams/Designer/Diagram%20Lifecycle.md#promoting-a-draft-to-active
[Repository Tools]:{ndr}/AI/MCP%20Tool%20Reference/Repository%20Tools.md
[Services]:{ndr}/Repository%20Model/Services/Overview.md
[Snippets]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Snippets.md
[Systems]:{ndr}/Repository%20Model/Systems/Overview.md
[Tags]:{ndr}/Administration/4.%20Customize/5.%20Tags/Features/What%20is%20a%20Tag.md
[Templates]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Templates.md
[Transport Contracts]:{ndr}/Repository%20Model/Services/Overview.md#fa-microchip-transport-contracts-the-heart-of-service-definitions