Re-arrange layout with AI
relayout_diagramAutomatically rearrange a diagram's layout for readability. Starts a background job, waits for completion, then returns the rearranged XML along with warnings and a score.
Instructions
Automatically re-arrange a diagram's layout for readability (async). Starts the job and waits for it to finish, returning the re-laid XML + fresh warnings/score. Every re-layout costs credits based on the tokens it uses (like edit/fix) and requires confirm=true. If the job is still running when the wait elapses, returns a job_id you can poll with get_relayout_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Consent to the token-based charge (required to start). | |
| diagram_id | Yes | The diagram id |