cancel_design_run
ChatGPTStop a design run that is queued or running. Use it when the brief was wrong, or when a stuck run blocks a new one on the same project. Screens the agent already finished stay in the project; credits already spent are not refunded.
create_project
ChatGPTCreate an empty Sleek project to design into. This is the first step of the flow: create_project, then design, then screenshot. Creating a project is free and instant; only design runs spend credits. Share the returned projectUrl with your user so they can watch and edit the designs.
delete_project
ChatGPTPermanently delete a project and every screen in it. This cannot be undone and the designs cannot be recovered. Only call it after your user has confirmed the deletion by naming the project; never call it to tidy up on your own initiative.
design
ChatGPTRun Sleek's design agent on a project: it creates or edits screens from a plain-language brief. Send the WHOLE request as ONE message ('a food delivery app: onboarding, restaurant list, dish detail, cart, order tracking, and profile') rather than one call per screen. The agent plans the set together, so one message produces a coherent app and repeated calls produce mismatched screens and spend credits each time. Each run spends credits from the workspace. By default this waits for the run to finish; if it has not finished in time it returns status 'running' and you poll get_design_run. Only one run can be active per project: on CONFLICT, wait for the current run or cancel_design_run first. If a finished run has status 'failed' with an error.url, the user has to act at that URL (top up credits, upgrade) before you retry. When the run completes, share the returned projectUrl with your user and call screenshot to show them the result.
get_component
ChatGPTFetch one screen with its generated HTML, addressed by the component id (the id field from list_components, not the screenId). Returns only the screen's active version by default, because a screen's full history is large; pass allVersions to get every revision. The response also carries the screen's screenId, which is what design takes. Use it when you need the markup to hand off to a build step, not to check whether a design run worked.
get_design_run
ChatGPTCheck a design run. Poll this after a design call that returned status 'queued' or 'running'; a few seconds between polls is plenty. On 'completed' the result lists the screens created or updated, and you should share the projectUrl and take a screenshot. On 'failed' read error.message, and if error.url is present send your user there to resolve it.
get_project
ChatGPTFetch one project by id. Use it to confirm a project still exists and to get its projectUrl to share with your user. Use list_components to see the screens inside it.
get_project_view
ChatGPTCalled by Sleek's screen viewer to load a project's screens, in canvas order, with their images and the viewer's text. To read screens yourself, use list_components.
list_components
ChatGPTList the screens in a project with their names and active version numbers. Each screen carries a screenId, which is what design takes, and an id, the component id, which is what screenshot and get_component take. It deliberately omits the generated HTML, so it stays small enough to call freely: use it to find the screenId to pass to design or the componentIds to pass to screenshot, then call get_component only for the one screen whose code you actually need.
list_projects
ChatGPTList the Sleek projects in the connected workspace, newest first. A project is one app: it holds the screens, the theme, and the design chat. Call this before create_project so you reuse an existing project instead of starting a duplicate.
list_references
ChatGPTList Sleek's curated design references: real app styles the design agent can imitate. Each one has an id and preview images. When your user asks for a specific look ('like Airbnb', 'brutalist', 'dark fintech'), pick the closest reference here and pass its id as referenceId to design. Skip it and the agent picks a style on its own.
open_sleek
ChatGPTCalled by ChatGPT's sidebar and Sleek's widget to show the workspace's newest projects, each with a cover. To list projects yourself, use list_projects.
screenshot
ChatGPTRender up to four screens of a project into a single image and return it inline, so your user can see the designs without leaving the conversation. Call it after a design run completes, with componentIds from list_components. Rendering does not spend credits. Send the projectUrl alongside the image so the user can open and edit the real thing.
search_mentions
ChatGPTFind the workspace's projects by name for an @ mention, newest first. Each item is a resource link whose name is the projectId and whose uri is the projectUrl. To browse every project, use list_projects.
show_project
ChatGPTShows your user a project's screens inline, in canvas order. They can enlarge a screen, add screens to this chat, and open the project in Sleek. After a design run completes, call it with that runId to show what the run made. Where the client cannot show apps, this returns the screen names only; use screenshot to see the screens. Returns the screen names and ids, the same ones design takes as screenId.