Re-arrange layout with AI
relayout_diagramRearrange diagram layouts automatically for improved readability. Confirm the token cost to start the async job and receive updated XML, warnings, and a quality 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 |