create-interfaces-visualization
Adds a C4-styled interfaces diagram to an existing architecture project, visualizing interfaces, types, enums, and their relationships to document complex type systems and API contracts.
Instructions
Create a new C4-styled interfaces visualization 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.
An interfaces diagram is a specialized C4-styled visualization that shows your type system in a
comprehensible format, with clear styling for interfaces, types, enums, and the relationships
between them. It's ideal for documenting complex type systems and API contracts.
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
Benefits:
- Automatic PlantUML code generation with consistent C4 styling
- Clear visualization of interfaces, types, and their relationships
- Customized styling to distinguish between different element types
Required Input Fields:
- projectId: String (ID of the project to add this diagram to)
- title: String (The name of your interfaces 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 interfaces/ 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-interfaces-visualization"
}
}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 |