Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
xmlNoImport existing BPMN XML instead of creating a blank diagram. Alternative to filePath. Ignored when cloneFrom is given.
nameNoOptional name for the diagram / process
filePathNoPath to a .bpmn file to read and import instead of creating a blank diagram. Alternative to xml. Ignored when cloneFrom is given.
cloneFromNoClone an existing diagram instead of creating a blank one. Provide the diagram ID to clone from. Returns a new diagram ID.
draftModeNoWhen 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.
hintLevelNoControls 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.
autoLayoutNoWith xml/filePath: force (true) or skip (false) auto-layout. When omitted, auto-layout runs only if the XML has no diagram coordinates. Ignored otherwise.
includeImageNoList 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).
workflowContextNoOptional 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the write/open-world nature, but the description adds substantial context beyond them: it returns a diagram ID for reuse, warns that forcing autoLayout:true may reposition elements and disturb boundary event placement, notes that xml/filePath imports start with an empty undo/redo history, and explains lint-feedback suppression semantics. This is exactly the kind of side-effect disclosure a mutation tool needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the three creation modes before the return value and caveats, so the primary decision is answered first. It is a dense single block of prose, though; the autoLayout warning and workflow tips could be more scannable, keeping it just shy of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, zero-required creation tool with no output schema, the description covers the return value (diagram ID), the mode selection logic, and the major side-effect caveat. It is nearly complete, though it does not explain default naming or what a blank diagram contains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 and the schema carries most parameter documentation. The description still adds meaning on top: it clarifies the mutual exclusivity of cloneFrom vs xml/filePath, the auto-detection rule for autoLayout when omitted, and that hintLevel overrides draftMode. Marginal but real added value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (create) and resource (BPMN diagram) and immediately enumerates the three distinct modes: blank, cloned via cloneFrom, or imported from xml/filePath. An agent can tell this apart from add_bpmn_elements, create_bpmn_participant, and the other create-adjacent siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes between modes: cloneFrom is ignored-alternative to xml/filePath, autoLayout is only meaningful with xml/filePath, and draftMode vs hintLevel precedence is stated. It also names the concrete workflow (combine with export_bpmn filePath for open→edit→save) and the condition for each path, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.