locate-or-create-c4-project
Finds or creates a C4 architecture project to group related context, container, component, and code diagrams and keep diagram relationships intact.
Instructions
A C4 project is a collection of related architecture diagrams that describe a system at different levels of detail. This tool sets up the foundation for creating a cohesive set of diagrams including Context (L1), Container (L2), Component (L3), and Code (L4) diagrams.
IMPORTANT: If your intent is to create a container, component, or code diagram, then it is likely that a project
already exists and you SHOULD NOT create a new project. Instead:
1. Check for existing project IDs in any PUML code shared in the conversation
2. Look for notes like: "This diagram is part of the X project with ID Y"
3. If you find a project ID, DO NOT use this tool and skip directly to calling the appropriate diagram creation tool
Creating multiple disconnected projects for the same system will break diagram relationships and navigation.
Conditional Input Fields:
To locate an existing project:
- id: String (UUID of an existing project - use this if you already know the project ID)
To search for or create a project:
- name: String (Name of the architecture project to search for or create)
- rootPath: String (Filesystem path where project directories will be created if needed)
- description: String (A brief explanation of what the project represents)
Response Fields:
- message: String (User-friendly message about the operation)
- projectId: String (UUID of the existing or newly created project)
- diagrams: Object (Information about existing diagrams if a project was found)Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "locate-or-create-c4-project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | UUID of an existing project - use this if you already know the project ID | |
| name | No | Name of the architecture project to search for or create | |
| rootPath | No | Filesystem path where project directories will be created if needed | |
| description | No | Optional description of what the project represents |