create_bpmn_diagram
Create BPMN 2.0 diagrams from scratch, by cloning an existing diagram, or by importing BPMN XML/file. Returns a diagram ID for editing and export.
Instructions
Create a new BPMN diagram: blank, cloned from an existing diagram (cloneFrom), or imported from existing BPMN XML (xml or filePath). Returns a diagram ID that can be used with other tools. For an xml/filePath import, if the XML lacks diagram coordinates (DI), auto-layout is applied; use autoLayout to force or skip it. Warning: Forcing autoLayout: true on diagrams that already have DI coordinates may reposition elements and can affect boundary event placement — for diagrams with boundary events, subprocesses, or complex structures, prefer autoLayout: false (or omit it to use auto-detection). An xml/filePath import creates a fresh modeler with an empty undo/redo history; combine with export_bpmn filePath to implement an open→edit→save workflow. Use draftMode: true to suppress lint feedback during incremental construction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | Import existing BPMN XML instead of creating a blank diagram. Alternative to filePath. Ignored when cloneFrom is given. | |
| name | No | Optional name for the diagram / process | |
| filePath | No | Path to a .bpmn file to read and import instead of creating a blank diagram. Alternative to xml. Ignored when cloneFrom is given. | |
| cloneFrom | No | Clone an existing diagram instead of creating a blank one. Provide the diagram ID to clone from. Returns a new diagram ID. | |
| draftMode | No | When true, suppress implicit lint feedback on every operation. Useful during incremental diagram construction to reduce noise. Validation is still available via validate_bpmn_diagram, and export_bpmn still enforces its lint gate. Default: false. Deprecated: use hintLevel instead. | |
| hintLevel | No | Controls implicit feedback verbosity. 'full' (default) includes lint errors, layout hints, and connectivity warnings. 'minimal' includes only lint errors. 'none' suppresses all implicit feedback (equivalent to draftMode: true). Overrides draftMode when set. | |
| autoLayout | No | With xml/filePath: force (true) or skip (false) auto-layout. When omitted, auto-layout runs only if the XML has no diagram coordinates. Ignored otherwise. | |
| includeImage | No | List of image formats to append to every mutating tool response. Pass ['png'] for a 2×-resolution PNG, ['svg'] for a cropped SVG, or ['png', 'svg'] for both. Also accepts boolean: true = ['png'] (default when omitted), false = no images. Set to [] or false to keep responses small (CI / batch mode). | |
| workflowContext | No | Optional hint about the workflow context. 'single-organization' suggests using lanes for role separation within one pool. 'multi-organization' suggests using collaboration with separate pools for distinct organizations. 'multi-system' requires collaboration with message flows between technical systems. Adds structural guidance to the response to help choose the right modeling approach. |