Fix code errors in a design
fix_code_errorsWhen a design will not build or shows a blank or broken preview, run the automatic fixer on it: known problems are repaired directly, and what remains is repaired by our AI, verified to compile before it is saved. Pass the error text the user saw as error_message if there is one. Each design gets a small number of AI attempts; after that only direct repairs run and ai_attempts_exhausted is true — then restore an earlier version instead. Fixes land in version history. Does not change which design is live. Not for design changes — use refine_site for those.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | The site, from list_sites | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| variation_id | No | variation_id of the design to fix (from list_variations). Omit for the site's chosen design. | |
| error_message | No | The error the user saw, e.g. "Cannot read properties of undefined (reading 'map')" |