create-context-diagram
Creates a C4 Level 1 Context diagram within an existing architecture project to give stakeholders a high-level view of users, the system, and external dependencies.
Instructions
Create a new C4 Context diagram within an existing architecture project.
If you need to make changes to an existing diagram, use the update-element and update-relationship tools instead.
A Context diagram (C4 Level 1) shows your system in its environment, focusing on people and systems rather than technologies or implementation details. Use this when you need a high-level overview that stakeholders can easily understand.
IMPORTANT: Before using this tool, you will need either:
- the project ID returned from the create-c4-project tool
- to locate the project ID of an existing project; In this case, the projectId can be found in a note within the PUML source code for each diagram in the existing project
DO NOT create a new project if you have access to an existing project ID. Reusing the same project ID ensures proper relationships between different diagram levels.
Benefits:
- Automatic PlantUML code generation without needing to write syntax
- Shows your system, its users, and external system dependencies
- Perfect for explaining the big picture to executives and stakeholders
Required Input Fields:
- projectId: String (ID of the project to add this diagram to)
- title: String (The name of your system/diagram)
Optional Input Fields:
- description: String (A brief explanation of what the diagram represents)
The response will include unique IDs that you'll need for all subsequent operations,
and the diagram will be saved in your project's context/ directory.
Response Fields:
- message: String (User-friendly message about the update)
- projectId: String (UUID of the project)
- elementIds: Object (Mappings of element IDs by diagram)
You can use the add-element and add-relationship tools to design your diagram,
and when you're finished, you must call the generate-diagram-image tool to create
a png image of the completed diagram.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>",
"title": "<title>"
},
"name": "create-context-diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title for the new diagram | |
| projectId | Yes | ID of the project to add this diagram to | |
| description | No | Optional description of what the diagram represents |