create_element_with_view
Creates a model element and its visual diagram view in a single call, enabling quick population of UML diagrams with native types like actors, use cases, or classes.
Instructions
Create a model element AND its visual View on a diagram in one call. Use for populating native typed diagrams (UMLUseCaseDiagram, UMLActivityDiagram, UMLClassDiagram, etc.). Type examples: 'UMLActor', 'UMLUseCase', 'UMLAction', 'UMLInitialNode', 'UMLFinalNode', 'UMLDecisionNode', 'UMLClass', 'UMLComponent', 'UMLNode'. Returns view._id (for edge connections) and model._id. Requires staruml-mcp-extension to be installed in StarUML. Install from https://github.com/ezrabrilliant/staruml-mcp-extension
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left X coordinate (default 100) | |
| y | No | Top Y coordinate (default 100) | |
| x2 | No | Right X coordinate (default x+100) | |
| y2 | No | Bottom Y coordinate (default y+50) | |
| name | No | Element label | |
| type | Yes | Element metamodel type. Examples: 'UMLActor', 'UMLUseCase', 'UMLAction', 'UMLInitialNode', 'UMLFinalNode', 'UMLDecisionNode', 'UMLMergeNode', 'UMLForkNode', 'UMLJoinNode' | |
| parentId | Yes | Owning model's _id (usually a UMLModel or UMLPackage) | |
| diagramId | Yes | Target diagram's _id |