Edit Mermaid diagram
mutateApply a list of structured edit ops to an existing Mermaid source and
return the edited diagram. This is the declarative counterpart to execute:
plain JSON in, plain JSON out, no sandbox. Prefer it for straightforward edits;
reserve execute for logic the ops don't express.
Returns { ok, family, source, verify:{ ok, warnings } } on success, or
{ ok:false, family, opIndex, error } — where error names the offending field
and lists the valid ones — when an op is malformed or cannot apply. Ops apply in
order and are all-or-nothing: the first failing op stops the batch (its position
is opIndex) and the input is left untouched.
Each op is { "kind": , …fields }. Call describe_sdk for the detected
family before authoring unfamiliar ops; it returns compact signatures or exact
field types, enum values, defaults, and constraints.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Non-empty ordered list of edit ops; each is { kind, ...fields }. | |
| source | Yes | Mermaid source to edit. |