add_project_image
ChatGPTUpload base64 raster bytes or fetch a public image URL, create the image, and place it on the MagicPath canvas. Canvas images are separate from component build assets: this places a picture on the canvas, it does not make the image usable from component source. To use an image inside component code, download its bytes into assets/** in your working directory so the archive carries them and reference that path from TSX or CSS — MagicPath validates the bytes server-side and rejects a file whose content does not match its extension. Never inline a data:image URL into TSX or CSS. Use prepare_asset_upload to move a host-local image to a referenceable URL instead of sending base64 here.
arrange_canvas_shapes
ChatGPTAlign, distribute or lay out shapes without computing coordinates yourself: MagicPath measures the shapes and does the arithmetic. distribute_* evens the gaps between the outermost two shapes; grid/row/column repack from the top-left of the current selection using per-row and per-column sizes so mixed-size shapes do not overlap. Shapes must share a parent; any that do not are reported back untouched.
cancel_component_code_session
ChatGPTClose an unsubmitted coding session only when the user wants to abandon its unfinished work, revoking its upload access and releasing its open-session slot. The unfinished component remains on the canvas. Do not cancel sessions to evade the cap. Submitted work cannot be cancelled with this tool. Repeating a cancellation is safe, but each call consumes one API call and requires remaining quota.
create_canvas_app_session
ChatGPTCreate a short-lived, single-use login grant for the embedded MagicPath canvas. Only the app receives the grant. Used for initialization and renewal.
create_canvas_shapes
ChatGPTDraw native tldraw shapes on the canvas for wireframes, diagrams, labels and annotations: geo boxes (rectangle, ellipse, diamond and the rest), text, sticky notes, arrows, lines and frames. Send ONE STEP of a drawing per call — the frame, then a region, then the contents of that region, roughly 3-8 shapes each — rather than composing a whole layout and sending it at once: your cursor is visible on the canvas and the user is watching it build. Shapes within a call land together and stack in the order given. text sets a shape label. Use parentShapeId to place a shape inside an existing frame or group. For arrows and lines, x/y is the start and end is the endpoint in the SAME coordinate space, not an offset from the start. With parentShapeId, both are relative to that frame/group; without it, both use canvas coordinates. Example: inside a frame at (3400,200), start (360,350) and end (500,390) stay {x:360,y:350,end:{x:500,y:390}}; do not add the frame position. This is for canvas artwork — build real UI with the component code tools instead.
create_project
ChatGPTCreate a named personal or team MagicPath project.
create_skill
ChatGPTCreate an editable MagicPath skill in the personal or team workspace.
delete_canvas_shapes
ChatGPTDelete native canvas shapes — wireframe boxes, text, notes, arrows, lines, frames and groups. Component and image shapes are refused: the canvas is rebuilt from those entities, so a delete here would reappear on next open. Deleting a frame or group keeps its children and lifts them out rather than removing content that was not named. Only use when the user asked to delete something.
delete_skill
ChatGPTPermanently delete an owned personal or team skill.
get_active_projects
ChatGPTReturn projects currently open in the authenticated user’s MagicPath web canvas sessions.
get_api_quota
ChatGPTRead the effective billing owner, remaining external-agent API calls, reset time, and charging rules. One prompt may make many tool calls. This lookup consumes one API call and requires remaining quota; the returned balance includes this call.
get_canvas_context
ChatGPTRead the shapes on a project canvas: position, size, rotation, stacking index, parent — and what each one is. text is the label written on the shape (wireframe copy, sticky notes, annotations), style is its colour and fill, image shapes carry imageId and component shapes carry componentId with the revision the canvas is showing. Read that text before designing from a wireframe rather than inventing copy. Pass view: "tree" to nest each frame's and group's children inside it, which is how a wireframe is meant to be read; the default flat view lists every shape as a sibling. Paginated — pass the returned nextCursor for the next page, and types to filter (for example ["mp-component","frame"]). In tree view a page counts top-level shapes and always carries their children whole. shapeCount and shapeCountByType always describe the whole canvas, not the filtered page, so they mean the same thing whatever you ask for; matchedShapeCount reports how many matched a types filter. Coordinates are parent-relative: a shape inside a frame or group is positioned against that parent, not the page.
get_component_build_status
ChatGPTPoll an MCP/CLI component build job and return status, public error, revision, and preview URL. Completed asset builds require no follow-up; start a fresh code session only for a later edit. A failed build reports how to retry: fix the files and resubmit the same codeSessionId with submit_component_code.
get_component_code_context
ChatGPTReturn complete editable files and constraints for a component revision without starting a build. For selected-element inspection, pass elementTargets and the captured revisionId to verify source locations and preserve data-magicpath attributes. Start a code session with the same targets before editing.
get_component_install_plan
ChatGPTReturn all files, dependencies, imports, usage, and host actions needed to install one or more MagicPath components locally. This server cannot write the host filesystem.
get_context
ChatGPTReturn the authenticated user, teams, MCP connection details, and CLI parity map.
get_project
ChatGPTLook up one MagicPath project by id: name, owner (personal or team), your role, live component count, timestamps, and the editor URL. Use it to confirm a project id taken from a URL, a share link, or get_active_projects before listing its components or starting a code session. A project you cannot access reads as not found.
get_project_export
ChatGPTExchange a MagicPath clone key for a short-lived ZIP download URL and host-side unpack/install guidance.
get_selection
ChatGPTRead what the user has selected right now on their open MagicPath canvases. shapes is the full live selection — wireframe boxes, text, notes, frames (with their children nested inside) — each with its label text, alongside the components and images lists. Call this before asking for an id, and whenever the user says "this", "selected", or "here". Build from the selection's own text rather than inventing copy. To use a selected image in component code, pass its imageId/shapeId to start_component_code_session and use the assetPath returned by that session.
get_share_url
ChatGPTReturn a view/share URL for a project id, a component id, or a component's generatedName. The identifier is resolved, so an id that does not exist fails rather than returning a guessed link. The host may open the URL.
get_skill
ChatGPTGet a skill by id, slug, or exact name, including every bundled text file.
get_theme
ChatGPTReturn a complete accessible MagicPath theme/design-system definition.
group_canvas_shapes
ChatGPTCombine shapes into a group, wrap them in a named frame, or take a group/frame apart. group keeps shapes exactly where they are; frame draws a titled container with padding around them. ungroup lifts children back out and removes the container. Components and images can be grouped — their position and parent survive canvas rebuilds.
import_skill
ChatGPTImport a base64 .zip/.skill archive and preserve all validated bundled files.
inspect_component
ChatGPTReturn cleaned source, utilities, dependencies, import statement, and JSX usage for a MagicPath component.
list_components
ChatGPTList components in an accessible project with revision and preview metadata.
list_project_images
ChatGPTList images and access URLs on an accessible MagicPath project canvas.
list_projects
ChatGPTList personal and team MagicPath projects, including ownership and component counts.
list_skills
ChatGPTList available or owned MagicPath skills for the personal or team workspace.
list_team_members
ChatGPTList the users and roles in one accessible MagicPath team.
list_teams
ChatGPTList MagicPath teams the authenticated user belongs to.
list_themes
ChatGPTList accessible MagicPath themes/design systems for a personal or team workspace.
open_magicpath_canvas
ChatGPTOpen MagicPath files and the design canvas inside the conversation. Optionally choose a project. Select components or elements and send a targeted change request to this conversation.
order_canvas_shapes
ChatGPTChange which shapes draw on top. front/back move shapes past all their siblings; forward/backward step one position. Stacking is per parent, so shapes inside different frames are ordered within their own frame.
prepare_asset_upload
ChatGPTCreate short-lived signed URLs for moving a host-local image without putting its base64 bytes in an MCP tool call. The host must PUT the file to uploadUrl with the returned headers, then use sourceUrl immediately in submit_component_code.
recover_component_code_session
ChatGPTRecover an existing unexpired session and its upload/workspace details after a lost or truncated response. Provide exactly one of codeSessionId, componentId, or the idempotencyKey retained before starting. Creates no replacement component. Each call consumes one API call and requires remaining quota. Multiple matches are reported explicitly. Use section files/images with offset when the session reports truncated metadata.
search_components
ChatGPTSearch accessible MagicPath components by display name or generated name.
search_magicpath_resources
ChatGPTSearch accessible MagicPath designs and canvas images to attach as references in the conversation composer.
start_component_code_session
ChatGPTImmediately create the pending canvas state and visible agent presence for an edit (componentId) or create (optional projectId), before research. Omit both ids to create a project. Retain an idempotencyKey; reuse it with identical arguments after a lost response, or recover_component_code_session. At most 10 open unsubmitted sessions per caller per project; prefer batches of 2–3 and retain each result. Pass codeSessionId to submit_component_code; never choose revision ids. Branch on filesInlined: edit editableFiles or run download.command and unpack the baseline (tar -xzf). Creates preserve App/CSS as serverPreservedFiles; implement the generated stub. Use responsive React/TypeScript and Tailwind v4; no package/config/lockfiles, src/main.tsx, or node_modules. Archive upload is primary: use upload.command before expiry. If the shell requires network permission, request supported network escalation before uploading. After a DNS, network, proxy, or 502 error, check sandbox restrictions and retry with approved access if supported. Use inline files only when archive upload remains unavailable and the complete work fits its limits. Never remove assets or simplify the work to fit inline limits; ask the user to enable shell network access instead. In a sandbox, Read before editing. Download selected images to their exact assetPath destinations before use. For edits, applyAttachedDesignSystem requires the user request or confirmation to switch themes.
style_canvas_shapes
ChatGPTChange appearance or label text on native canvas shapes: color, fill, dash, size, font, alignment, geo kind, arrowheads, frame name. Component and image shapes are refused — their appearance comes from their content. Size and position belong to transform_canvas_shapes.
submit_component_code
ChatGPTSubmit code for a session. First run upload.command from start_component_code_session to PUT a gzipped tar to upload.uploadUrl (no headers), then call with codeSessionId. Archive upload is primary. If the shell requires network permission, request supported network escalation before uploading. After a DNS, network, proxy, or 502 error, check sandbox restrictions and retry with approved access if supported. Use inline files only when archive upload remains unavailable and the complete work fits: files: [{path, content}] (UTF-8 text only, 30 files, 512 KiB total, no assets/). Never remove assets or simplify the work to fit inline limits; ask the user to enable shell network access instead. Inline files use the same archive validation. Archive paths: src/App.tsx, src/index.css, src/components/generated/, assets/. Other paths are ignored and reported as ignoredPaths. Images belong in assets/; images below src/ are refused. The build uploads assets to durable URLs, rewrites references, and removes staging files. Creates preserve unchanged scaffold; component/revision ids are resolved server-side. This waits briefly for fast builds; poll get_component_build_status only while pending or processing. A failed build leaves the session usable: correct files and re-upload (or pass corrected inline files), then submit with the same codeSessionId. Non-Tailwind class names need CSS sent as a .css file beside the component.
transform_canvas_shapes
ChatGPTSet position, size, rotation or lock state on existing shapes in one atomic change. Only use when the user asked to move, resize, rotate or lock canvas shapes. Component and image shapes accept geometry only — their content is owned by MagicPath and changed through the component and image tools. Prefer arrange_canvas_shapes when the intent is aligning or laying out rather than exact coordinates.
update_skill
ChatGPTUpdate editable skill fields or enabled state. Packaged skill content is immutable.
view_canvas_image
ChatGPTLook at an image on a MagicPath canvas by imageId, from get_canvas_context, get_selection, or list_project_images. Returns the picture as a native MCP image block plus a short-lived accessUrl carrying the original bytes. An imageId is not a picture: call this before describing, critiquing, or designing from a canvas image. To embed the image in component code, download accessUrl into assets/** in your code-session working directory and reference that path — never the URL, which expires.
view_component
ChatGPTLook at a built MagicPath component as it renders, by componentId. Returns a native MCP image block of the stored preview for the revision the canvas is showing, or for revisionId when you name one. Use it to check your own work after a build, and to see a component before editing it. Previews are captured shortly after each build completes, so a just-built revision may return previewAvailable: false — retry in a few seconds rather than treating it as an error.