{"ok":true,"site":{"host":"uidesigneditor.com","url":"https://uidesigneditor.com/","type":"live","desc":"A simple and free ui design tool. Select, cut, move and resize. Work together with your AI. No signup.","tools":[{"name":"read_design","kind":"answer","impl":"imperative","description":"Start here when you first connect to UI Design Editor. Full AI instructions: https://uidesigneditor.com/instructions.txt. Read the open design, project list, selected item ids, revision and a short usage guide. Item positions and sizes use canvas pixels. Use the latest returned projectId and revision for each edit. Image data is omitted by default. This reads saved design data, not a screenshot; use export_design with PNG to check the look.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"includeImages":{"type":"boolean","description":"Default false. Set true to include full PNG, GIF, and MP4 data URLs and saved inner image contents; results can be large."},"iconSearch":{"type":"string","maxLength":100,"description":"Find up to 80 icon names containing this text, such as play. An empty string lists the first 80 names."}},"required":[],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"edit_design","kind":"act","impl":"imperative","description":"Add, move, resize, restyle, hide or remove items, or set the page size and color, in one Undo step. Supply only the changes you need; other fields stay as they are. New items go on top in the order supplied. To copy an item, add its fields with a new or omitted id. Canvas size changes do not scale items unless you also update their boxes. Use arrange_items for item order and fit_items_to_content for a tight box. Read the latest projectId and revision first. Returns the design, latest revision and addedIds.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"addItems":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Name shown in the item list."},"x":{"type":"number","minimum":-16000,"maximum":16000,"description":"Left edge in canvas pixels; 0 is the left edge of the page."},"y":{"type":"number","minimum":-16000,"maximum":16000,"description":"Top edge in canvas pixels; 0 is the top of the page."},"w":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box width in canvas pixels."},"h":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box height in canvas pixels."},"text":{"type":"string","maxLength":100000,"description":"Text shown by this item."},"fontSize":{"type":"number","minimum":1,"maximum":1024,"description":"Text size in pixels."},"iconSize":{"type":"number","minimum":1,"maximum":2048,"description":"Icon size in pixels."},"icon":{"type":"string","maxLength":100,"description":"Icon name from read_design with iconSearch; use an empty string to clear it."},"color":{"type":"string","maxLength":128,"description":"Text or icon color, such as #ffffff."},"background":{"type":"string","maxLength":128,"description":"Fill color, such as #000000 or transparent."},"borderColor":{"type":"string","maxLength":128,"description":"Border color."},"borderWidth":{"type":"number","minimum":0,"maximum":1000,"description":"Border width in pixels; 0 hides it."},"radius":{"type":"number","minimum":0,"maximum":16000,"description":"Corner radius in pixels."},"opacity":{"type":"number","minimum":0,"maximum":1,"description":"Opacity from 0 (clear) to 1 (solid)."},"align":{"enum":["left","center","right"],"description":"Text alignment within the box."},"fontWeight":{"type":"number","minimum":100,"maximum":900,"description":"Text weight from 100 to 900; 400 is normal and 700 is bold."},"lineHeight":{"type":"number","minimum":0.1,"maximum":10,"description":"Line height as a multiple of text size."},"fontFamily":{"enum":["sans","serif"],"description":"Text face: sans or serif."},"wrap":{"type":"boolean","description":"Whether text may wrap onto more than one line."},"hidden":{"type":"boolean","description":"Hide this item without removing it."},"iconOffsetX":{"type":"number","minimum":-16000,"maximum":16000,"description":"Horizontal icon offset in pixels."},"highlightWord":{"type":"string","maxLength":10000,"description":"Word or text to highlight in a reading item."},"highlightColor":{"type":"string","maxLength":128,"description":"Fill color behind the highlighted text."},"contentScale":{"type":"number","minimum":0.001,"maximum":1000,"description":"Scale the contents inside the box; 1 keeps their size."},"shape":{"enum":["rectangle","arrow"],"description":"Shape type for a shape item; omit for a plain box."},"strokeWidth":{"type":"number","minimum":0.5,"maximum":1000,"description":"Arrow line width in pixels."},"arrowStart":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow start within the item box, with each value from 0 to 1."},"arrowEnd":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow end within the item box, with each value from 0 to 1."},"src":{"type":"string","maxLength":40000000,"pattern":"^data:(image/(png|gif)|video/mp4);base64,[A-Za-z0-9+/=]+$","description":"Full PNG, GIF, or MP4 data URL. Required for image and video items. MP4 videos loop with sound off. Use import_image for other picture types. Replacing src clears saved inner image edits."},"imageBase":{"type":"boolean","description":"Marks a picture as the page background; keep the value returned by read_design."},"pictureFragment":{"type":"boolean","description":"Marks a piece moved from a picture; keep the value returned by read_design."},"id":{"type":"string","maxLength":200,"minLength":1,"description":"Unique item id. Omit when adding an item to let the editor assign one."},"kind":{"enum":["label","icon","shape","reading","tab","button","textbox","image","video"],"description":"Item type. Use shape with shape rectangle or arrow for shapes, and label for plain text."}},"required":["kind","x","y","w","h"],"additionalProperties":false},"minItems":0,"maxItems":5000,"description":"New items to add on top. Each needs kind, x, y, w and h; the editor fills omitted style fields."},"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":200,"minLength":1,"description":"Existing item id from read_design."},"changes":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Name shown in the item list."},"x":{"type":"number","minimum":-16000,"maximum":16000,"description":"Left edge in canvas pixels; 0 is the left edge of the page."},"y":{"type":"number","minimum":-16000,"maximum":16000,"description":"Top edge in canvas pixels; 0 is the top of the page."},"w":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box width in canvas pixels."},"h":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box height in canvas pixels."},"text":{"type":"string","maxLength":100000,"description":"Text shown by this item."},"fontSize":{"type":"number","minimum":1,"maximum":1024,"description":"Text size in pixels."},"iconSize":{"type":"number","minimum":1,"maximum":2048,"description":"Icon size in pixels."},"icon":{"type":"string","maxLength":100,"description":"Icon name from read_design with iconSearch; use an empty string to clear it."},"color":{"type":"string","maxLength":128,"description":"Text or icon color, such as #ffffff."},"background":{"type":"string","maxLength":128,"description":"Fill color, such as #000000 or transparent."},"borderColor":{"type":"string","maxLength":128,"description":"Border color."},"borderWidth":{"type":"number","minimum":0,"maximum":1000,"description":"Border width in pixels; 0 hides it."},"radius":{"type":"number","minimum":0,"maximum":16000,"description":"Corner radius in pixels."},"opacity":{"type":"number","minimum":0,"maximum":1,"description":"Opacity from 0 (clear) to 1 (solid)."},"align":{"enum":["left","center","right"],"description":"Text alignment within the box."},"fontWeight":{"type":"number","minimum":100,"maximum":900,"description":"Text weight from 100 to 900; 400 is normal and 700 is bold."},"lineHeight":{"type":"number","minimum":0.1,"maximum":10,"description":"Line height as a multiple of text size."},"fontFamily":{"enum":["sans","serif"],"description":"Text face: sans or serif."},"wrap":{"type":"boolean","description":"Whether text may wrap onto more than one line."},"hidden":{"type":"boolean","description":"Hide this item without removing it."},"iconOffsetX":{"type":"number","minimum":-16000,"maximum":16000,"description":"Horizontal icon offset in pixels."},"highlightWord":{"type":"string","maxLength":10000,"description":"Word or text to highlight in a reading item."},"highlightColor":{"type":"string","maxLength":128,"description":"Fill color behind the highlighted text."},"contentScale":{"type":"number","minimum":0.001,"maximum":1000,"description":"Scale the contents inside the box; 1 keeps their size."},"shape":{"enum":["rectangle","arrow"],"description":"Shape type for a shape item; omit for a plain box."},"strokeWidth":{"type":"number","minimum":0.5,"maximum":1000,"description":"Arrow line width in pixels."},"arrowStart":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow start within the item box, with each value from 0 to 1."},"arrowEnd":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow end within the item box, with each value from 0 to 1."},"src":{"type":"string","maxLength":40000000,"pattern":"^data:(image/(png|gif)|video/mp4);base64,[A-Za-z0-9+/=]+$","description":"Full PNG, GIF, or MP4 data URL. Required for image and video items. MP4 videos loop with sound off. Use import_image for other picture types. Replacing src clears saved inner image edits."},"imageBase":{"type":"boolean","description":"Marks a picture as the page background; keep the value returned by read_design."},"pictureFragment":{"type":"boolean","description":"Marks a piece moved from a picture; keep the value returned by read_design."}},"required":[],"additionalProperties":false,"description":"Only the fields to change on this item. Item id and kind stay fixed."}},"required":["id","changes"],"additionalProperties":false},"minItems":0,"maxItems":5000,"description":"Changes to existing items; use each id once."},"removeIds":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1,"description":"Existing item id from read_design."},"minItems":0,"maxItems":5000,"description":"Existing items to remove. Do not also update these ids in the same call."},"canvas":{"type":"object","properties":{"width":{"type":"number","minimum":1,"maximum":16000,"description":"Page width in pixels, up to 16,000."},"height":{"type":"number","minimum":1,"maximum":16000,"description":"Page height in pixels, up to 16,000."},"background":{"type":"string","maxLength":128,"description":"Page fill color, such as #ffffff or transparent."}},"required":["width","height","background"],"additionalProperties":false,"description":"Page size and color. Supply all three fields. Width times height must be at most 24 million pixels."}},"required":["projectId","revision"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"create_design","kind":"act","impl":"imperative","description":"Create and open a full design as a new named project, keeping existing projects. Prefer this for new work unless the user asks to edit an existing project. Supply the whole canvas and items ordered from back to front; an empty items list creates a blank page. Items stay separate and editable. Standalone drafts without Projects replace their page in one Undo step. Read the current projectId and revision first. Returns the new open project, design and revision.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"name":{"type":"string","maxLength":200,"minLength":1,"description":"Project name from 1 to 200 characters; must contain some text."},"canvas":{"type":"object","properties":{"width":{"type":"number","minimum":1,"maximum":16000,"description":"Page width in pixels, up to 16,000."},"height":{"type":"number","minimum":1,"maximum":16000,"description":"Page height in pixels, up to 16,000."},"background":{"type":"string","maxLength":128,"description":"Page fill color, such as #ffffff or transparent."}},"required":["width","height","background"],"additionalProperties":false,"description":"Page size and color. Supply all three fields. Width times height must be at most 24 million pixels."},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Name shown in the item list."},"x":{"type":"number","minimum":-16000,"maximum":16000,"description":"Left edge in canvas pixels; 0 is the left edge of the page."},"y":{"type":"number","minimum":-16000,"maximum":16000,"description":"Top edge in canvas pixels; 0 is the top of the page."},"w":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box width in canvas pixels."},"h":{"type":"number","minimum":0.1,"maximum":16000,"description":"Box height in canvas pixels."},"text":{"type":"string","maxLength":100000,"description":"Text shown by this item."},"fontSize":{"type":"number","minimum":1,"maximum":1024,"description":"Text size in pixels."},"iconSize":{"type":"number","minimum":1,"maximum":2048,"description":"Icon size in pixels."},"icon":{"type":"string","maxLength":100,"description":"Icon name from read_design with iconSearch; use an empty string to clear it."},"color":{"type":"string","maxLength":128,"description":"Text or icon color, such as #ffffff."},"background":{"type":"string","maxLength":128,"description":"Fill color, such as #000000 or transparent."},"borderColor":{"type":"string","maxLength":128,"description":"Border color."},"borderWidth":{"type":"number","minimum":0,"maximum":1000,"description":"Border width in pixels; 0 hides it."},"radius":{"type":"number","minimum":0,"maximum":16000,"description":"Corner radius in pixels."},"opacity":{"type":"number","minimum":0,"maximum":1,"description":"Opacity from 0 (clear) to 1 (solid)."},"align":{"enum":["left","center","right"],"description":"Text alignment within the box."},"fontWeight":{"type":"number","minimum":100,"maximum":900,"description":"Text weight from 100 to 900; 400 is normal and 700 is bold."},"lineHeight":{"type":"number","minimum":0.1,"maximum":10,"description":"Line height as a multiple of text size."},"fontFamily":{"enum":["sans","serif"],"description":"Text face: sans or serif."},"wrap":{"type":"boolean","description":"Whether text may wrap onto more than one line."},"hidden":{"type":"boolean","description":"Hide this item without removing it."},"iconOffsetX":{"type":"number","minimum":-16000,"maximum":16000,"description":"Horizontal icon offset in pixels."},"highlightWord":{"type":"string","maxLength":10000,"description":"Word or text to highlight in a reading item."},"highlightColor":{"type":"string","maxLength":128,"description":"Fill color behind the highlighted text."},"contentScale":{"type":"number","minimum":0.001,"maximum":1000,"description":"Scale the contents inside the box; 1 keeps their size."},"shape":{"enum":["rectangle","arrow"],"description":"Shape type for a shape item; omit for a plain box."},"strokeWidth":{"type":"number","minimum":0.5,"maximum":1000,"description":"Arrow line width in pixels."},"arrowStart":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow start within the item box, with each value from 0 to 1."},"arrowEnd":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Horizontal position within the item, from 0 at the left to 1 at the right."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Vertical position within the item, from 0 at the top to 1 at the bottom."}},"required":["x","y"],"additionalProperties":false,"description":"Arrow end within the item box, with each value from 0 to 1."},"src":{"type":"string","maxLength":40000000,"pattern":"^data:(image/(png|gif)|video/mp4);base64,[A-Za-z0-9+/=]+$","description":"Full PNG, GIF, or MP4 data URL. Required for image and video items. MP4 videos loop with sound off. Use import_image for other picture types. Replacing src clears saved inner image edits."},"imageBase":{"type":"boolean","description":"Marks a picture as the page background; keep the value returned by read_design."},"pictureFragment":{"type":"boolean","description":"Marks a piece moved from a picture; keep the value returned by read_design."},"id":{"type":"string","maxLength":200,"minLength":1,"description":"Unique item id. Omit when adding an item to let the editor assign one."},"kind":{"enum":["label","icon","shape","reading","tab","button","textbox","image","video"],"description":"Item type. Use shape with shape rectangle or arrow for shapes, and label for plain text."}},"required":["kind","x","y","w","h"],"additionalProperties":false},"minItems":0,"maxItems":5000,"description":"Whole design, ordered from back to front. Use an empty list for a blank page."}},"required":["projectId","revision","name","canvas","items"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"select_project","kind":"act","impl":"imperative","description":"Open an existing project using an id from the projects list returned by read_design. Each project keeps its work and Undo history. This tool needs only the destination projectId, not a revision. Returns the newly open design and its revision for later edits. Available only on pages with Projects.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Destination project id from the projects list returned by read_design."}},"required":["projectId"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"arrange_items","kind":"act","impl":"imperative","description":"Move the given visible items forward or backward one step in the canvas item order, in one Undo step. Forward puts them above the next item; backward puts them below the previous item. The chosen items keep their order within the set, and page background pictures stay fixed. Uses itemIds, not the current selection. Read the latest projectId and revision first. Returns the design, revision and changed (false if already at the edge).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"itemIds":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1,"description":"Existing item id from read_design."},"minItems":1,"maxItems":5000,"description":"One or more distinct item ids from read_design. The current canvas selection does not affect which items this tool changes."},"direction":{"enum":["forward","backward"],"description":"Move one step toward the front or back. Repeat with the returned revision for more steps."}},"required":["projectId","revision","itemIds","direction"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"fit_items_to_content","kind":"act","impl":"imperative","description":"Fit the given boxes to their text or icons using the same measurements as the canvas Fit box to content action, in one Undo step. Keeps text, styles, text position and existing line breaks. Supports label, icon, reading, tab, button and textbox items. Hidden items, shapes, pictures and empty boxes stay as they are. Uses itemIds, not the current selection. Read the latest projectId and revision first. Returns fittedIds for changed boxes and unchangedIds for all other requested items.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"itemIds":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1,"description":"Existing item id from read_design."},"minItems":1,"maxItems":5000,"description":"One or more distinct item ids from read_design. The current canvas selection does not affect which items this tool changes."}},"required":["projectId","revision","itemIds"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"rename_project","kind":"act","impl":"imperative","description":"Rename the open project and save its name. To rename another project, call select_project first. Keeps its design, id and Undo history. The name sits outside canvas Undo; call rename_project again to change it back. Available only on pages with Projects. Read the latest projectId and revision first. Returns the project list and latest revision. There is no project deletion tool.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"name":{"type":"string","maxLength":200,"minLength":1,"description":"Project name from 1 to 200 characters; must contain some text."}},"required":["projectId","revision","name"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"import_image","kind":"act","impl":"imperative","description":"Open a screenshot or picture from full base64 image data. mode new opens a project at the picture size; mode add fits it inside the current page, centered at x/y or the view center. Supports PNG, JPG, WebP, GIF, AVIF, BMP and HEIC. GIFs keep playing and support moving and resizing the whole item; area edits skip GIFs. This keeps the picture as an image item; it does not turn its text into editable text. Use edit_design to add separate items over it, or move_image_region to move part of a still picture. No links or file paths are fetched. Read the latest projectId and revision first. Returns the design, revision and addedIds.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"name":{"type":"string","maxLength":200,"minLength":1,"description":"Picture file name; also names the new project in mode new."},"dataUrl":{"type":"string","maxLength":40000000,"pattern":"^data:image/(png|jpeg|webp|gif|avif|bmp|heic|heif);base64,[A-Za-z0-9+/=]+$","description":"Full image data URL including its type and base64 bytes. Example start: data:image/png;base64,. Maximum 40 million characters."},"mode":{"enum":["add","new"],"description":"add places the picture on this page; new opens it in a new project at its own size."},"x":{"type":"number","minimum":-16000,"maximum":16000,"description":"Desired picture center x in canvas pixels for mode add; defaults to the view center."},"y":{"type":"number","minimum":-16000,"maximum":16000,"description":"Desired picture center y in canvas pixels for mode add; defaults to the view center."}},"required":["projectId","revision","name","dataUrl","mode"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"import_html","kind":"act","impl":"imperative","description":"Import a design saved as HTML by this editor, without running its scripts. Extract its initial-layout JSON and send a small HTML document containing only that application/json script; other markup is ignored. Imports that one design, not the whole saved project list. mode new opens a project; mode add adds its items at the view center. Other HTML needs rebuilding as items with create_design or edit_design. Read the latest projectId and revision first. Returns the design and latest revision.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"name":{"type":"string","maxLength":200,"minLength":1,"description":"Saved HTML file name; also names the new project in mode new."},"html":{"type":"string","maxLength":60000000,"description":"HTML text containing a script with type application/json and id initial-layout whose text is the saved design JSON. Include only that script to keep the call small."},"mode":{"enum":["add","new"],"description":"new opens the saved design in a new project; add places its items in the current project."}},"required":["projectId","revision","name","html","mode"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"move_image_region","kind":"act","impl":"imperative","description":"Move a rectangular part of the visible pictures on the canvas in one Undo step. Fills the old spot from nearby picture colors, then adds the moved part as a separate image item. This can change several pictures under the source box; text and other item types stay as they are. Both the source box and destination use canvas pixels, even for a scaled picture. The source box must stay inside the page and contain a visible picture. Read the latest projectId and revision first. Returns the design, revision and addedIds.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":16000,"description":"Source left edge in canvas pixels."},"y":{"type":"number","minimum":0,"maximum":16000,"description":"Source top edge in canvas pixels."},"w":{"type":"number","minimum":1,"maximum":16000,"description":"Source width in canvas pixels."},"h":{"type":"number","minimum":1,"maximum":16000,"description":"Source height in canvas pixels."}},"required":["x","y","w","h"],"additionalProperties":false,"description":"Picture area to change. Keep all four edges inside the canvas."},"x":{"type":"number","minimum":-16000,"maximum":16000,"description":"Destination left edge in canvas pixels, not an offset or picture center."},"y":{"type":"number","minimum":-16000,"maximum":16000,"description":"Destination top edge in canvas pixels, not an offset or picture center."}},"required":["projectId","revision","box","x","y"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"erase_image_region","kind":"act","impl":"imperative","description":"Erase a rectangular area of the visible pictures on the canvas in one Undo step, using the same action as Delete on a picture area. Fills page background pictures from nearby colors; clears the area to transparent on added pictures and hides an added picture if the whole picture fits inside the box. All visible pictures under the box can change. Text, shapes and other item types stay as they are. Uses a box in canvas pixels and requires a visible picture inside it. Read the latest projectId and revision first. Returns the design, revision and erasedIds for changed picture items. Creates no new image item.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":16000,"description":"Source left edge in canvas pixels."},"y":{"type":"number","minimum":0,"maximum":16000,"description":"Source top edge in canvas pixels."},"w":{"type":"number","minimum":1,"maximum":16000,"description":"Source width in canvas pixels."},"h":{"type":"number","minimum":1,"maximum":16000,"description":"Source height in canvas pixels."}},"required":["x","y","w","h"],"additionalProperties":false,"description":"Picture area to change. Keep all four edges inside the canvas."}},"required":["projectId","revision","box"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"merge_image_items","kind":"act","impl":"imperative","description":"Merge chosen moved picture pieces into the page background in one Undo step, using the canvas No item action. Use itemIds of visible image items marked pictureFragment by move_image_region or the canvas picture tools. Requires at least one visible page background picture. Combines all page background pictures and the chosen pieces into one picture, and removes the chosen pieces as separate items. Other items stay separate above the background. Clips pieces at the page edges. Uses itemIds, regardless of the current selection. Read the latest projectId and revision first. Returns the design, revision, mergedIds and backgroundId. Undo restores the separate pieces and backgrounds.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"itemIds":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1,"description":"Existing item id from read_design."},"minItems":1,"maxItems":5000,"description":"One or more distinct item ids from read_design. The current canvas selection does not affect which items this tool changes."}},"required":["projectId","revision","itemIds"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"undo_design","kind":"act","impl":"imperative","description":"Undo or redo one canvas edit in the open project using the same history as the user. A tool edit with several changes counts as one step. This can also undo a user edit, so read the design first. Project names sit outside this history. Returns an error when no step exists. Read the latest projectId and revision first. Returns the restored design and latest revision.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"direction":{"enum":["undo","redo"],"description":"undo restores the previous canvas state; redo reapplies the last undone step."}},"required":["projectId","revision","direction"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"export_design","kind":"act","impl":"imperative","description":"Read or save the current design as JSON, editable HTML, or a PNG picture without changing it. Use format png and delivery inline to check how the design looks. JSON holds the open design, including pictures; HTML includes the editor and its projects and can be large. delivery download starts a browser download; inline returns content as text (PNG as a data URL). Returns filename and mimeType, plus content for inline or bytes and downloaded for a download. Uses no clipboard. Read the latest projectId and revision first.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"projectId":{"type":"string","maxLength":200,"minLength":1,"description":"Open project id from the latest tool result. Use select_project first to edit another project."},"revision":{"type":"string","maxLength":100,"minLength":1,"description":"Revision from the latest tool result. Call read_design again if the page changed; never reuse an old revision after an edit."},"format":{"enum":["json","html","png"],"description":"json for design data, html for a file the user can edit later, png for a picture of the canvas."},"delivery":{"enum":["download","inline"],"description":"inline returns the file contents to Codex; download saves a file through the browser."}},"required":["projectId","revision","format","delivery"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]}],"category":"Developer Tools","favicon":"/favicons/uidesigneditor.com.png","apiSurface":"spec","toolCount":14}}