AgentMarketMCP / SKILL 资产档案馆

目录 / SVG Lab

MCP 鉴权未知 未评级 已上架

SVG Lab

Give your AI a design engine. SVG Lab connects Claude, ChatGPT, Codex and Cursor to a real design engine: ask for an app screen, an icon set or an illustration, and SVG Lab builds it as clean SVG on a canvas, with spacing, alignment and typography handled for you. Your AI can zoom in and polish details, and every design saves to your SVG Lab projects. No editor tab needs to be open. **Connect:** add `https://svglab.app/mcp` as a custom connector and sign in (OAuth). No key needed. **Early access** is open and free until 2 October 2026. Request access at https://svglab.app/mcp-early-access

该来源不提供完整文件导出(国内平台多为平台内托管),仅存元数据与原链

接入信息

传输形态
http
鉴权方式
鉴权未知
端点
https://svglab--svglab.run.tools
鉴权方式未标注,请核对官方文档后再接入——不要直接使用以下片段
{
  "mcpServers": {
    "SVG Lab": {
      "url": "https://svglab--svglab.run.tools"
    }
  }
}

能力清单

工具说明
account_statusCheck which SVG Lab plan this account is on and whether the SVG Lab editing tools are available to you. Call this first if other tools are missing, then relay the message to the user as written.
connectOptional status check; never required. Nothing needs to be open in SVG Lab and there is no pairing code: every call runs in the user's own SVG Lab editor on the server and saves to their cloud projects (My Projects). Drawing tools work without calling this first. Reports the signed-in account, the current project and whether the server editor is open, plus the working routine. pairing_code and mode are accepted from older clients and ignored.
session_statusWhere drawing calls run and what is open, without opening anything. Every call runs in the user's own SVG Lab editor on the server (mode 'headless'); nothing needs to be open in SVG Lab. Reports whether that editor is open and responding (browser {alive, idle_seconds}), the current cloud project with its link, and today's server editor use. expected_pairing_code is accepted from older clients and ignored.
list_projectsList the user's saved SVG Lab cloud projects (the same list as My Projects), newest first: id, name, updated_at, size {pages}, and a link. Use it to continue earlier work with open_project.
open_projectOpen one of the user's saved projects to keep working on it. Pending changes to the current project are saved first. Later sessions reopen it automatically.
new_projectStart a new, named, empty cloud project and switch to it; the current one is saved first. Use it before drawing something unrelated to the open project, so the user finds each piece under its own name in My Projects. Refused when the plan's project limit is reached.
current_projectThe project being drawn into now: id, name, whether everything is saved, and the link that opens it in SVG Lab. Give the user that link when you finish.
design_guideRead SVG Lab's guidance before building: the working order for a kind of artwork and the traps that produce subtly broken results. Interface work: design-read FIRST (feeling words are not a style: premium is not dark mode or a serif) with brief-to-direction, lively-color and typography-direction, then design-thesis, design-system, system-first, values-sheet, copy-and-variants, slop-catalog, design-taste, bold-and-premium, layout-structure, craft-engineering, photos for imagery, data-viz for charts, ui-copy-states for error, empty and loading words, mobile-frame for phone screens, landing-composition for landing and pricing pages, responsive-artboards for one screen at several widths, decks-and-formats for slides, social formats and posters, design-variants when the brief is vague (finished options, not questions), then dark-ui only when the product itself needs a dark interface (never just because the brief says premium) and craft-typography / craft-color / craft-spacing for the numbers. Supplied image: reference-drawing, curve-construction, a drawing-example. Logos and lettering: logo-export, vintage-lockup, layered-sticker-lettering. UI illustrations: illustration-style, silhouette-drawing, ui-illustration and illustration-construction BEFORE drawing, materials-and-light for shaded art and any glass the brief asks for, then review_illustration. People and poses: figure-anatomy and figure-views BEFORE the first joint, line-of-action for a gesture stroke, interior-lines for detail inside a silhouette, form-lines for contour lines that give a silhouette volume, reference-when-stuck only after your own attempt still does not read. Scenes (sky, sea, landscape, weather): scene-illustration. Line art: line-art. Strokes: stroke. Repeats: symbols. Finish with finishing-pass, zoom-review, then self-critique on the rendered preview. Call with no topic to list all.
list_fontsThe curated type catalog: each family's role (display, text, both, mono, accent), personality, what it suits and avoids, pairings and weights. There is no default face: a tab has no font until you choose one for this product (design_tokens set.font.sans / display / mono), and text without a chosen font is refused. Call with no arguments for the short list, filter by role, category or a subject word in query, and call with family for one face's pairings. Faces in locked are the ones models pick by habit; they open only after design_tokens {user_named_fonts} when the user named them.
get_editor_stateRead editor instance_id/build/page_id and active drawing tool, selected shape ids, zoom, pan and viewport size. Operation receipts identify the editor too; stop and recheck if instance_id changes unexpectedly. Does not change artwork.
set_toolActivate an editor tool, such as select, direct, pencil or hand. Use select to leave the user ready to edit after drawing.
set_selectionSelect shapes by id, or pass an empty array to clear selection without deleting artwork. Rejects missing, hidden or locked shapes.
fit_viewFrame the whole canvas, an artboard, an artboard group, or selected artwork. Changes only the view, never artboard dimensions. Replaces the app's Fit menu.
set_viewSet zoom (1 = 100%, range 0.02 to 32) and optionally centre on document coordinates. Omitted centre preserves the current viewport centre. Does not resize artwork.
dismiss_editor_popoversClose the Fit menu and any other open popover without deleting or ungrouping anything.
get_canvas_previewRender a PNG without moving the live view. Zoom to find flaws: target artboard renders the screen at about 1600 px on its longer side (a smaller scale is raised to that unless max_size is passed) and returns suggested_regions; then pass {artboard, region:{x,y,width,height}} (artboard-local) to crop any area at up to 8x, and grid:true to label coordinates on the image (never in the artwork) so you can name the next crop. An overview at 1x is not proof a drawing works; see design_guide zoom-review. For drawing, mode:"silhouette" with sizes:[48,96,192] on target shapes is the silhouette and thumbnail test in one read-only call. scale is capped by max_size (max 4, or 8 with region). Returns dimensions, bounds, actual_scale and an image receipt. Match that receipt to the displayed image; an intended edit is not visual proof.
review_illustrationRead-only UI illustration review. Supply assembly ids and up to four interacting part groups. Returns native-size assembly, enlarged assembly and isolated parts in the SAME frame. Optional focus records one observed defect, target ids, protected ids, geometric change and visible success criterion; returns a compact repair review instead of the full checklist. For a user-directed small correction use focus directly; no full-guide reread needed. Optional overlaps check layer ordering only. No geometry changes, enforced edit locks or automatic quality score. For figures it also measures: line_of_action_overshoot (a gesture stroke leaving the body outline, with the places), limb_unattached (a create_limb shoulder or hip outside every body shape), ambiguous_overlap (same-coloured limb and body crossing with nothing to say which is in front), view_mix (parts declared in different views), arm_twist (a near arm reaching back across the torso) and joint_notch / joint_detached (head and neck, foot and ankle, hand and wrist not one contour). For any assembly it reports detached_part: a part (a declared part, or a single shape) that neither overlaps nor touches the main body through any chain of parts, with the gap and a transform edit that closes it.
set_reference_imageLoad a PNG/JPEG/WebP data URL for read-only comparison, never as artwork. Obtain bytes using the client file reader; do not transcribe base64. Returns reference_id for compare_reference. Up to two images live in this editor tab; reload clears them. No tracing or geometry extraction.
compare_referenceRead-only reference/artboard comparison. Default: reference, artwork and absolute color difference PNGs (NOT a quality score). Optional review:{paths:[{shape_id,...}],grid_step?,overlay_opacity?} returns FOUR same-crop/same-scale views: reference with grid, clean artwork, artwork with indexed anchors and grid, and transparent overlay. Grid is artboard-local, labels P1:subpath:anchor map to review.paths; stored coordinates and display_to_stored map rotated paths to edit_path without artboard. State the visible mismatch and chosen label/handle before editing, then compare the SAME crop. Focus at most 80 anchors across 1–8 paths with subpath_index and anchor_indices. Reference is aspect-preserved and centered; metadata reports placement. No tracing, editing, or automatic coordinate extraction.
measure_textMeasure rendered text and word wrapping before placement. Returns line content, width, height, overflow and rendered (top_offset above y and rendered height), so you can place text without guessing where glyphs land. Use the same typography in create_text.
define_stylesDefine named style presets, saved with the project. Use style_ref on creation; explicit style fields override the preset. Values are copied, not live bindings. Redefining does not change existing artwork.
list_design_stylesRead named style presets and their lifetime.
inspect_layoutInspect text overlap, occlusion, readability and overflow. Declare containment for card padding: padding is the MINIMUM inset on every side and the EXACT inset on a declared horizontal (left/right) or vertical (top/bottom) edge; center/middle compare rendered box centres. Every pair comes back with measured_insets, so declare the padding the design actually uses (16 for a 16 card inset) rather than guessing. alignment_mismatch carries suggested_translation for the child; pass apply true to have SVG Lab move the children in one undo step instead of calling transform per shape. No declared containment means no parent or centering checks. Default reading threshold is 12; do not lower it to hide warnings. Review each warning; this is not a design-quality certificate.
inspect_pathRead one path with indexed anchors and absolute handles. Set preview:true to receive a clean PNG and an annotated PNG linking visible points to edit_path indices. Labels are subpath_index:anchor_index, starting at zero. Purple circles are hin; orange squares are hout. Focus dense paths with subpath_index and anchor_indices (up to 80); crop is displayed document coordinates. The table stays in stored coordinates before shape rotation: use edit_path without artboard. Inspection is read-only and annotations never enter artwork or export. Compare the clean result with the reference before and after a focused correction; use compare_reference for surrounding context. audit:true measures the curve craft (anchors missing at extrema, tilted extremum handles, handles too long or short for the bend, near-kinks, crossed handles, anchors with no handles, redundant anchors) at display_width and returns each finding with a ready edit_path fix; list intended sharp points in corners. Run it after every drawn silhouette.
export_artboardExport one artboard without changing the live document. Defaults to editable text with embedded fonts. outline_text outlines an export copy and checks text advance; it never replaces the source text. Check warnings and preview before handoff.
design_tokensRead or change the design tokens every layout and component uses in this tab: spacing scale, radii, type styles, colour roles, control heights, icon sizes, layout (screen margin, bar heights, safe areas). Phone safe areas follow the artboard size (390 x 844 gets a 47 unit status area, 393 x 852 gets 59) unless you set layout.safe_top / safe_bottom yourself. Call with no arguments to read them. preset "light" or "dark" swaps the colour roles; set overrides individual values (set.color.accent for the product accent, set.type.title.size, set.radius.md, set.font.display). Spacing, radius and type sizes are a scale: pick from it instead of inventing 13, 19 or 27 unit values. Fonts start empty: choose them from list_fonts for this product (set.font.sans, set.font.display, set.font.mono); layouts and text refuse to run until you do. user_named_fonts records a locked face the user asked for by name. Only accent is required among the accent roles: accent_text, on_accent and accent_soft are derived from it with readable contrast unless you set them. Tokens are saved with the project and come back when the editor reopens. Changing tokens does not restyle existing shapes; rebuild with update_layout.
list_componentsList the composable components (button, input, search_field, card, top_bar, tab_bar, segmented, badge, chip, avatar, list_item, divider, toggle, checkbox, radio, progress, progress_ring, bar_chart, sparkline, area_chart, photo_card, stat, section_header, empty_state, dialog, status_bar, home_indicator, icon_row), their props and defaults, the built-in icon names, the layout node types (including layers, slot, arc, sparkline, area_chart, image) and the exact shape kinds ring, arc, arc_line. Read once before create_layout.
create_layoutBuild a screen or a section from a layout TREE instead of coordinates. Data, gauges and photography are components too: progress_ring, bar_chart, sparkline and area_chart are drawn with exact geometry and token colours (area_chart has real axes, grid lines and a callout pill on a highlighted point), and photo_card / the image node crop a real photograph through a clipPath with a scrim under overlay text. Never hand-place bars, approximate a ring with a smoothed path, or leave a grey rectangle where a photo belongs. A slot node reserves a box and draws nothing: draw illustration afterwards and fit_to_box it there. SVG Lab measures the real text, lays out stacks and grids with token gaps and padding, sizes fill/hug children, centres labels by rendered bounds, expands components, keeps a semantic hierarchy (node paths like screen/body/card/title) and returns every node's box, its shape ids and warnings (content_overflow, text_truncated, artboard_overflow). Use it for UI: describe the hierarchy, not the pixels. One call is one undo step. Example root: {id:"screen", height:"fill", fill:"bg", children:[{component:"top_bar", props:{title:"Orders"}}, {id:"body", padding:{x:"xl"}, gap:"2xl", children:[{component:"card", props:{children:[{content:"This week", style:"heading"}, {component:"stat", props:{label:"Revenue", value:"$12,480"}}]}}]}, {type:"spacer"}, {component:"tab_bar", props:{items:[{label:"Home", icon:"home", active:true}]}}]}. Resolve warnings with update_layout, then get_canvas_preview and inspect_design, then zoom into its suggested_regions (design_guide zoom-review).
update_layoutRebuild a layout from create_layout after changing it, so spacing and alignment stay coherent instead of nudging shapes by hand. patches address nodes by path (screen/body/card/title): set merges node fields, props merges component props, children replaces children, remove deletes fields. root replaces the whole tree. Old shapes are deleted and new ids returned; one undo step. Artwork you fitted into a slot follows the slot when the rebuild moves or resizes it (slot_artwork lists what moved).
list_layoutsList the layouts built in this tab with their ids, so update_layout can address them.
create_iconDraw one built-in monoline icon (search, home, user, bell, chevron_right, plus, close, check, menu, heart, star, settings, calendar, clock, mail, lock, camera, map_pin, filter, share, edit, trash, info, alert, play, pause, eye, bookmark, grid, list, cart, download, upload, refresh, sun, moon, wifi, battery, signal, arrows...) at a token size with few editable anchors, grouped. Use this instead of emoji, letters or hand-built glyphs for UI icons; use make_symbol to reuse a custom drawn icon.
check_contrastCompute the WCAG contrast ratio between two colours (tokens or CSS colours) and, when it fails, return the nearest darker or lighter variant that passes: suggested_foreground keeps your background, suggested_background keeps your text colour. Pass font_size and font_weight to use the large-text threshold. Use this instead of computing luminance by hand.
inspect_designDeterministic layout audit of an artboard. Use purpose:illustration for artwork to omit UI grid and container-style rules. Zero findings does NOT certify illustration quality, connected parts or believable geometry; visually inspect the assembled drawing. Returns findings plus improve_first (the single highest-leverage fix), top_findings (three, ranked) and removal_candidates (eyebrows, glows, nested cards, dividers) for the removal test. Checks: off-grid containers, inconsistent spacing rhythm, inconsistent corner radii, thin padding around labels, too many type sizes, small text, all-caps labels without tracking, emoji or filler copy, invented metrics, accent overuse, AI-default indigo and neon, decorative glow, tracked eyebrow labels, monospaced micro labels, nested cards, nested-radius mismatch, palette sprawl, pure black or white, objects outside the frame, accidental container overlaps, tiny targets, plus inspect_layout's overlap and contrast checks. Each finding names shape ids and the repair tool. Run it after every screen; it reports structure, not taste.
optical_centerCentre an icon or glyph inside a button, tile or avatar by its visual weight instead of its bounding box: the blur test from Craft, made deterministic. Renders the shapes, finds the ink centroid, and moves them so the centroid sits on the container centre (a right-pointing triangle ends up slightly left, a heavy-bottomed glyph slightly up). Use it after placing any icon in a round or square control. axis limits the correction; dry_run reports without moving.
clip_to_artboardClip artwork to the artboard frame in one call: every visible unlocked shape that crosses the frame (or only shape_ids) gets the frame as its clip. Geometry is untouched, so shapes still edit normally, and the canvas stays clean between screens. Use it for intentional background bleed (washes, big soft shapes, orbit rings); use resolve_overflow when the shape should actually move inside. Already clipped shapes are skipped unless include_clipped is true.
resizeSet the width and/or height of rectangles, rounded rectangles, ellipses and drawn shapes exactly, keeping the chosen anchor fixed. transform only scales uniformly; this is how you make a card 350 by 120.
snap_to_gridBy default snaps each shape separately, which can break illustration joins. Use as_unit:true to translate a complete illustration together without resizing; shape_ids may contain a group_id. UI grid alignment is optional for illustrations.
normalize_spacingSet one equal edge-to-edge gap between shapes along an axis, keeping the first in place. Omit gap to adopt the nearest space token to their median gap. Repairs inconsistent_spacing; distribute keeps both ends fixed instead.
normalize_radiiGive rectangles and rounded rectangles one corner radius (token or number). Repairs inconsistent_radii.
fit_to_childrenResize a container so it wraps the given children plus padding (default card padding 16). Repairs thin_padding and parent_overflow without recomputing boxes yourself.
resolve_overflowPull shapes back inside the artboard (or a container) with optional inset, shrinking anything larger than the frame. Repairs outside_frame and target_overflow.
fit_to_boxScale and position shapes together into a target box: contain (fit inside, centred), cover, or stretch. With artboard, x/y and the reported from/to boxes are local to that artboard; without it, all are document coordinates. Use it to fit an illustration into a card slot or a logo into a header instead of guessing scale factors.
repeatDuplicate shapes into a row, a grid or a circle with token gaps: list rows, dot grids, a ring of petals or badge stars. count includes the original. Radial mode rotates copies to face outward unless rotate is false. center_x/center_y are DOCUMENT coordinates unless artboard is supplied, then artboard-local (just like create_shapes). Copies remain real shapes; inspect the full destination artboard.
mirrorCreate a mirrored copy across a vertical or horizontal line (default: the shape's own edge plus gap), so symmetric artwork (wings, faces, vases, logos) is drawn once. merge unions a single path with its mirror into one symmetric outline through boolean_op, which rebuilds it as a new path; For a hand-drawn symmetric silhouette use join:"path" on the open half outline (or create_path mirror): one closed path with exactly reflected anchors, no rebuild.
smooth_pathFinish a path the way a pen tool would, in one call. mode fill_missing (default) completes only the handles the model left null, keeps every explicit handle, and leaves handle-less anchors sharper than corner_angle as corners: the fix for a curve that kinks at some anchors (inspect_path reports them as handle_gaps). mode fit walks the real curve, splits at corners and refits the fewest cubic Beziers within tolerance (Schneider), for sloppy or over-dense paths after booleans, imports or long pencil strokes. mode ink turns a stroked path into a filled outline with pressure-like thickness and tapered ends (perfect-freehand), refit to few anchors: for figures and marks, never for UI icons. Reports anchors before and after, corners kept and, for fit, the worst deviation. mode tidy applies the measured fixes from inspect_path audit at once (exact extremum splits, axis handles at extrema, aligned near-kinks, circle-consistent handle lengths) without moving or deleting any anchor you placed; protect and corners exempt anchors. One undo step.
search_photosFind real photographs for a screen and CHOOSE one. Each candidate returns its description (alt text), orientation and aspect, pixel size, dominant colour, photographer, licence and the exact attribution string, and (preview, default true) a small thumbnail image so you judge it by eye. Read design_guide photos before the first search. Query the product's own subject and moment ("barista pouring latte art close up", not "coffee" or "lifestyle"). Choose by subject first, then room for text where the caption goes, then colour fit with your palette (compare color to your tokens), then consistency of light and grade with the other photos on the screen; never settle for index 0 by default. Pass the chosen url to place_image, or use it as an image node or photo_card src in create_layout (the server fetches https links). Sources: Unsplash, then Pexels (both need an API key on the deployment; without one the call fails and says so). For the user's OWN files use upload_asset.
place_imagePut a real photograph on the canvas inside a box, the way a design tool does it: fit "cover" crops the picture to the box through a clipPath (the photo keeps its true proportions and stays repositionable, it is never squashed), fit "contain" fits it whole inside. corner_radius rounds the frame. scrim lays a transparent-to-colour gradient over the photo so overlay text stays readable on any image. Give it ONE source: data_url (base64 bytes you already have), url (a direct link to a PNG, JPEG, WebP or GIF, which the server fetches and size-limits to 1.5 MB) or photo {query} (the server searches Unsplash, then Pexels, and the reply says which source and the attribution to credit). Coordinates are local to artboard when given. Returns the image, scrim and clip ids and the rendered box; one undo step. For a hero card with a title over the photo, prefer the photo_card component inside create_layout, which lays the caption out for you. Choose the photo with search_photos first (read design_guide photos); for a file the user supplied (a generated image, a logo) use upload_asset.
describe_documentLook at what is currently on the user's canvas: every shape with its id, type, name, bounding box, and fill/stroke summary, plus artboard size. Call this before editing anything you did not just create, because every other tool targets shapes by id. It deliberately does not return path coordinates; use inspect_path for current indexed anchors and absolute handles before a focused edit_path correction. On a large document scope it: artboard returns only that screen's shapes, name_contains finds shapes by layer name, ids fetches specific shapes, limit/offset page. The reply also carries a top-level shapes array ({id, name, type, bbox, group_id, draw_order}, first 200); list_shapes returns the same rows with paging.
get_svgGet the finished SVG source of the current document. Use this when the user asks for the code, or wants to save or hand off the result. Do not use it for routine inspection: describe_document gives shape ids, inspect_path gives indexed anchors, and get_canvas_preview shows the drawing.
create_shapeDraw one shape on the canvas. Coordinates are in document units with the origin at the artboard's top-left, x rightwards and y downwards. For a geometric combination (a crescent, a notched rectangle), draw the parts and use boolean_op. For an organic outline, draw the combined silhouette anchor by anchor with create_path: boolean_op rebuilds the outline as a new path and loses hand-placed anchors and handles. Rings, arcs and orbit bands are their own kinds (ring, arc, arc_line) with exact curves.
create_textPlace a line of text on the canvas. To make text follow a curve, create the text and the path separately, then use text_on_path.
create_shapesDraw many shapes in ONE call. This is the right tool for interface work and you should reach for it by default: a screen is dozens of rectangles and labels, and drawing them one per call is slow and leaves the user with dozens of undo steps. A batch is one undo. For illustration, prefer path items whose anchors you placed one by one with deliberate handles; script-generated geometry reads robotic on organic forms, so keep it for regular patterns, textures, grids, rays and charts. Each item is {type: 'shape'|'text'|'path'|'pencil', ...the same fields that create_shape, create_text, create_path or pencil would take}. Items are drawn in order, so earlier items sit behind later ones: send a card before its label. Everything is validated first, so a bad item means nothing is drawn rather than half a screen. Returns created_ids in order. For UI illustrations, read ui-illustration and illustration-construction before the first batch. For reference illustrations, read reference-drawing first and batch one stage at a time: preview silhouettes before adding interior detail. Hands and limbs: create_hand, create_limb. A whole person: create_figure.
create_pathDraw a free-form path from a list of points. This is how you make organic shapes: silhouettes, animals, leaves, flowing forms, anything whose character is in its curves rather than in circles and straight edges. Use it instead of trying to approximate such a shape by stacking ellipses and triangles, which does not work. Use it for BOTH precise filled silhouettes and open interior lines. For reference drawing, read reference-drawing and curve-construction; choose anchors visually and set explicit absolute hin/hout with smooth:false. A sharp join may retain curved sides with independent handle directions. smooth:true recomputes all handles and can round intentional notches. Use pencil when you want a loose gesture or wobble. Preview silhouettes before interior detail, then inspect_path/edit_path to correct visible errors. Easiest way to set handles by hand: give an anchor tangent ("h" at a top or bottom, "v" at a side, or degrees of travel) and SVG Lab computes both handles at the circle-consistent length; add tension to change it, corner:true with tangent_in/tangent_out for a tip. If you set handles on only some anchors, pass fill_handles:true: the missing ones are completed, yours survive, and corners sharper than corner_angle stay sharp. Custom pixel-following scripts are automated tracing even if this tool submits the result. Hands and limbs: create_hand, create_limb. A whole person: create_figure.
pencilDraw a freehand stroke the way SVG Lab's Pencil tool does: you give the gesture (8 to 25 points along the line a hand would draw), and the editor densifies, adds optional wobble, then smooths it. Choose this for a loose or sketchy finish. For precise cartoon outlines or interior curves, use create_path with explicit handles instead. Read design_guide 'line-art' first. Default style is stroke only. wobble 0 to 1 is relative to the stroke width and is invisible on a large board; pass wobble_units (document units, e.g. 4 at 1200 px) for a line that visibly reads as hand-drawn. Pass ink:true (or ink options) for real pen weight: the gesture becomes a filled outline with tapered ends, refit to few anchors; figures and marks only, never UI icons.
create_limbPreferred tool for an arm or leg. Supply three ordered joints; SVG Lab constructs the editable contour and elbow/knee. Use instead of plotting limb polygons. Returns wrist/ankle position, direction and part IDs for attachment. Open hand or fist: create_limb first, then create_hand with limb_id and wrist = joints.c. Grip: create_hand first, then create_limb with hand_id and joints.c = the returned wrist. The two sides are real tapers through the offset joints, the outer turn is a circular arc and the inner turn is one sharp crease corner. Nearly collinear joints still draw, with a straight_limb warning; a bend too sharp for the width fails naming the joint rather than drawing a knot. Example: {kind:"arm", joints:{a:{x:180,y:140}, b:{x:250,y:250}, c:{x:360,y:300}}, width:44, taper:0.6, end_cap:"open", sleeve:{length:"short", color:"#3F5B74"}} draws a bent arm 44 units thick at the shoulder, tapering to 26 at the wrist. Those coordinates are DOCUMENT space because no artboard was given; pass artboard to use artboard-local coordinates instead. The default form is anatomical (muscle masses, bony elbow and knee), not a stick. For a side-view figure say which side each limb is on: depth "near" or "far" with attach_to the torso orders it and shades the far one; separation:true adds a thin line where it crosses the body; foot builds the foot of a leg. For a whole person, create_figure does all of this from one skeleton.
create_handPreferred tool for a visible hand, fist or grip. Builds editable hand parts from action and wrist pose. Use instead of plotting finger polygons. For holding an object, use grip with an explicit contact location. Unequal finger lengths, a knuckle arc, an opposing thumb and a wrist narrower than the palm come from the engine; you choose the action, the direction and the size. size comes from create_limb: hand_size_hint_open for open and fist, hand_size_hint_grip for a grip. Open hand or fist: create_limb first, then create_hand with limb_id and wrist = joints.c. Grip: create_hand first, then create_limb with hand_id and joints.c = the returned wrist. Example: {action:"open", wrist:{x:640,y:620}, direction:-90, size:120, thumb_side:"right"} draws a back-view hand 120 units from wrist to knuckles pointing up the screen. For a hold: {action:"grip", direction:110, size:100, grip:{contact:{x:1580,y:1217}, axis_angle:20, radius:17, object_id:"<the handle>"}} wraps the hand round that handle; grip.radius may be at most 0.34 x size. To hold a shape that is already drawn, pass holding:{object_id} and let SVG Lab find the contact, axis and radius; do not compute them yourself. For a silhouette or a small figure use action "mitten" (fingers together, thumb split off), never a circle: a round blob reads as a ball, not a hand. Open hand or fist: create_limb first, then create_hand with limb_id and wrist = joints.c. Grip: create_hand first, then create_limb with hand_id and joints.c = the returned wrist.
create_figurePreferred tool for a whole stylised person (silhouette, flat or pose-reference style). You choose the view, the facing and the pose skeleton; SVG Lab builds a torso with chest, waist and pelvis masses and a neck, a profile or front head, anatomical arms and legs with shoulder domes, mitten hands and feet, and stacks them far arm, far leg, torso, head, near leg, near arm, with the far side one tone away so front and back limbs never merge. Head, neck and back are one contour, and feet and hands grow out of the ankle and wrist with no seam. A near arm swinging back across the torso is swapped to the far side (arms_swapped). Every part is an ordinary editable path: refine anchors by hand afterwards, and draw hair, clothing and props yourself in the SAME view. Read design_guide figure-anatomy and figure-views first. Example: {view:"side", facing:"right", joints:{head:{x:378,y:186}, neck:{x:345,y:226}, pelvis:{x:252,y:330}, elbow_near:{x:268,y:262}, wrist_near:{x:224,y:208}, elbow_far:{x:402,y:282}, wrist_far:{x:438,y:220}, knee_near:{x:342,y:392}, ankle_near:{x:300,y:482}, knee_far:{x:178,y:406}, ankle_far:{x:106,y:490}}, skin:"#211D1A", separation:true, feet:{style:"shoe"}, line_of_action:{color:"#B4442C"}} draws a sprinter in the drive phase.
create_line_of_actionDraws a gesture stroke (line of action) over a figure that runs through the middle of the body and never past its outline: SVG Lab pulls your points toward the middle across the body, keeps the longest stretch that stays inside with a margin, inks it with tapered ends, then measures the result and trims or thins it until every point is inside. Use it instead of pencil for a line of action. Example: {figure_ids:["<figure group id>"], points:[{x:110,y:486},{x:250,y:330},{x:345,y:226},{x:376,y:190}], width:5, color:"#B4442C"}.
check_contactsRead-only geometric critic for assembled artwork: does each part actually touch what it belongs to? It supplements the preview and cannot judge readability; it catches floating petals, detached heads and stems stopping short, which is what a preview read by eye misses. pairs returns overlap / touch / clear plus overlap_area, min_gap and boundary_gap (the outline-to-outline distance, which is what says whether an interior crease stops short of its own contour); attachments checks one path endpoint against the shape it should reach. Open paths and lines carry half their stroke width, rotation is applied, compound holes are excluded, and a clipped or masked shape reports uncertain. Nothing is ever moved or snapped. Example: {pairs:[{a:"<petal>", b:"<stem>", expect:"overlap"}], attachments:[{shape_id:"<stem>", end:"start", into:"<flower head>"}]}.
list_shapesRead-only inventory: [{id, name, type, bbox, group_id, draw_order}] in back-to-front order, 200 rows by default with truncated:true when more exist. Use it to collect ids for grouping, reordering or textures instead of parsing describe_document. artboard scopes to one board with artboard-local bboxes. Example: {artboard:"<artboard_id>"}.
create_organicPreferred tool for clouds, foam and cloud-bank edges, wave rows and splashes in an illustration. Builds ONE editable path with explicit handles on every anchor (under 60), varied by seed and variation, so no two calls share a silhouette; use it instead of writing your own scallop or bump helper. cloud: overlapping lobes of different sizes (the biggest moves with the seed), flat base by default. scallop_edge: lobes riding a baseline, closed_to below for a foam line or hedge top. wave_row: rolling crests, curl throws a lip forward over a pocket. splash: a mound with radiating tapered jets plus detached droplets; sit its base_point ON the wave or rock and confirm with check_contacts. Example: {kind:"cloud", x:80, y:60, width:320, height:140, lobes:8, seed:3}.
add_textureTexture a shape with marks clipped to its outline: hatch, crosshatch, stipple, facets (Voronoi rock plates lighter and darker than the fill) or strata. The marks are clipped with the shape's own outline (rotation included), grouped, and placed directly in front of the shape (and in front of textures already on it). Returns group_id, count and clip_id; one undo removes it. Use it so a cliff reads as rock instead of flat colour. Example: {shape_id:"<cliff>", kind:"facets", spacing:80, seed:4} then {shape_id:"<cliff>", kind:"hatch", angle:62, spacing:10, coverage:{x:0, y:0.4, w:1, h:0.6}}.
scatterSeeded placement of many small copies of one item: rain, droplets, stars, pebbles, snow, grass tufts. Samples a rectangle, a whole artboard or the inside of a shape's outline, keeps min_distance, avoids avoid_ids, varies size and tilt, and creates everything as ONE group in one undo step. Same seed repeats exactly. Example: {region:{artboard:"<id>"}, count:150, seed:9, item:{type:"path", points:[{x:0,y:0},{x:-5,y:20}], style:{stroke:"#C9D9E8", stroke_width:1.5, fill:"none"}}, size_jitter:0.4, rotation_jitter:5}.
form_linesDraw an illustrator's form lines on a filled silhouette so it reads as a specific 3D object: curved cross-contours that fit the outline (a rim ellipse, the turn of a neck, a shoulder, a foot ring) and a highlight or shadow line that follows one side. Use it instead of drawing straight stripes across a round body, which flatten it. SVG Lab measures the silhouette's width profile, finds the landmarks, fits each ellipse to the real width at that height, stops lines short of the edge, tapers them, clips them inside, names them "form line: rim" etc., groups them with the silhouette and places them in front of it; one undo removes them. You choose which lines, where, and the colour if the default does not suit. Read design_guide form-lines first. Example: {shape_id:"<vase>", lines:[{at:"rim"}, {at:"neck"}, {kind:"highlight", side:"left"}, {at:"foot"}]}. Then look at the result at display size with get_canvas_preview.
edit_pathAdjust an existing path: nudge anchors, retune handles, add or remove a point, close it, or re-smooth the whole thing. This is how you refine a silhouette after looking at it, rather than deleting and rebuilding from scratch. Read inspect_path for CURRENT indexed anchors and absolute handles first; indices can change after edits. Preview after the correction. Set coordinate_space explicitly: artboard requires artboard; document uses inspect_path coordinates and omits artboard. Never pass create_path-only fill_handles here; use explicit hin/hout. Works on paths only; text_to_path converts text.
boolean_opCombine shapes into one using real path geometry. 'union' merges them, 'subtract' removes later shapes from the first, 'intersect' keeps only the overlap, 'exclude' keeps everything except the overlap. This is the correct and only way to make holes, rings, crescents and cut-outs. The result replaces the inputs with a single new shape.
text_to_pathConvert text into real letter outlines. Do this whenever you need to outline, offset, or boolean lettering, because offset_path and boolean_op only work on paths and refuse plain text. Also do it before the user exports a logo: an exported SVG names its font but does not contain it, so text renders with the wrong typeface for anyone who lacks that font, while outlines look identical everywhere. The trade-off is that the words can no longer be retyped afterwards, so get the wording right first.
offset_pathGrow or shrink a shape's outline by a real offset curve, keeping a constant distance all the way round. Positive grows outward, negative shrinks inward. Use this for outlines, keylines, borders and inset shapes rather than scaling, which changes thickness unevenly. Works on paths only, so convert lettering with text_to_path first; holes and counters are handled correctly.
simplify_pathCut a path's anchor count while keeping its outline. Use it on anything that came back dense: boolean_op and the knife flatten curves into polygons, freehand strokes carry every sampled point, and imported artwork is often thousands of anchors. A path nobody can edit by hand is not finished work, so run this before handing geometry back or animating it. The report gives points_before, points_after and max_deviation, the worst distance in document units that the new outline strays from the old one; judge the result by the deviation, not by the anchor count. Raise the tolerance to simplify harder. It will not invent structure: a single traced blob stays a single blob, only with fewer anchors.
transformMove, scale or rotate shapes. Prefer this over deleting and redrawing, because it keeps the shape's identity, style and layer position. Rotation is per shape about its own centre, not a rigid assembly rotation: it does not move separate detail centres around a parent. Rotate only parts whose visible orientation needs changing. A plain solid circle with uniform stroke is visually unchanged by centre rotation; directional fills, dashes, masks or effects may differ. Empty/identity transforms are rejected before relay.
alignAlign shapes to a common edge or centre line within their combined bounding box. Use this instead of computing positions yourself.
distributeSpace shapes evenly between the outermost two. Needs at least three shapes, since the first and last stay put and define the span.
set_styleChange fill, stroke, stroke width or opacity on existing shapes. Pass only the properties you want to change; anything omitted is left alone.
set_strokeSet stroke width, colour, cap, join and taper on existing shapes. THIS is how you find SVG Lab's stroke options without guessing set_style field names. Use after pencil for line-art: round cap, round join, width 1.5 to 2.5, optional taper 'both' so a stroke thins at the ends like a pen leaving the paper. Taper only works on open paths and lines. Read design_guide 'stroke'. Same fields as set_style; omitted properties stay as they are.
align_to_artboardPosition shapes relative to the page itself, rather than to each other. Use this to centre a finished logo instead of measuring bounding boxes and computing the offset by hand.
flipMirror shapes horizontally or vertically, in place.
reorderChange stacking order. Essential for layered artwork: an outline or shadow built from an offset copy is created on top, so it has to be sent behind the shape it belongs to. Also required before clip_shapes, which needs the clipper in front.
set_gradientFill shapes with a linear or radial gradient. Reach for this instead of flat colour whenever artwork needs depth: sunbursts, skies, metallic or glossy surfaces, and soft backgrounds all read as flat and cheap without it. Stops run from 0 at one end to 1 at the other.
set_filterApply a blur and/or a soft drop shadow. This is a true soft shadow: for a hard offset sticker shadow, duplicate the shape and move the copy behind instead. Call with neither blur nor shadow to clear effects.
set_patternFill shapes with a repeating built-in pattern, for texture rather than flat colour. Useful for vintage and print looks where a solid fill reads as too clean.
clip_shapesCrop shapes to the outline of another shape. A clip cuts hard to the outline; a mask fades by the clipper's brightness, so a gradient-filled mask produces a fade-out. The clipping shape must be in front of what it clips, so reorder first if needed.
text_on_pathBend a line of text along a path, which is how badge and emblem lettering curves around a circle. Draw the path first (an ellipse converted with boolean_op, or any path), then attach the text to it.
set_textChange the wording or typography of existing text: content, size, family, weight, style, letter spacing, line height, alignment. Letter spacing in particular is what makes small-caps straplines look deliberate rather than cramped. Does not work on text already converted with text_to_path, which is geometry rather than text.
set_artboardResize, reposition or rename an artboard, the page a drawing sits on. The artboard is also the exported frame, and it does not have to start at 0,0, so pass x and y when you need the frame somewhere specific. If you just want the artwork cropped neatly, use fit_artboard instead. With several artboards, pass `artboard` to change one you are not currently on; omit it to change the active one. Prefer its ID; ambiguous names are rejected. Renaming to an existing name receives a numeric suffix.
add_artboardAdd another artboard, so a design can hold several pages or screens side by side. THIS IS HOW YOU BUILD A SCREEN FLOW: give every screen its own artboard at the device's own size (a phone is 375 x 812), rather than laying ten screens out on one oversized page. Each artboard exports as its own frame, which is what makes the result a set of screens rather than a poster of screens. Pass x and y to place it deliberately on a grid; leave them out and it goes to the right of the current one. Shapes are not owned by an artboard, so after adding one you draw a screen by placing shapes inside that artboard's rect. Reused names receive a numeric suffix. Use the returned artboard_id for every subsequent creation, preview and export; never reconstruct it from the name or artboard geometry object.
list_artboardsList every artboard with its index, id, name, position and size, and say which one is active. Call this before placing shapes on a multi-screen design. Prefer stable IDs over names or indices. Creation coordinates are artboard-local when you pass artboard; otherwise they are document coordinates.
group_artboardsGroup ARTBOARDS together on the canvas, so a whole flow moves as one unit and reads as a single app rather than a scatter of loose pages. This is what a designer means by "group the screens". It is NOT the same as `group`, which ties shapes together INSIDE one frame: reach for that when a screen's own artwork should move together, and for this when the screens themselves belong to one product. Name the group after the app or the flow.
ungroup_artboardsBreak up an artboard group. The artboards and their artwork stay exactly where they are; only the grouping goes.
set_active_artboardSwitch which artboard is active. The active one is what fit_artboard trims and what a plain set_artboard changes. Drawing does NOT need this, because shapes are placed by document coordinates rather than into the active frame.
delete_artboardRemove an artboard. Shapes that sat inside it stay on the canvas; only the frame goes. The last remaining artboard cannot be deleted.
fit_artboardShrink the artboard to wrap tightly around everything on the canvas. Do this before exporting a logo or icon, otherwise the file carries whatever empty margin the page happened to have. Optionally leave an even padding around the artwork.
duplicateCopy shapes. Use this for repeated elements and for layered lettering effects rather than recreating the same shape several times, because the copy keeps the original's geometry exactly. The copy lands exactly on top of the original, so a keyline or shadow layer starts perfectly registered and you move it yourself by however much you want.
groupGroup all completed illustration parts (or pass artboard to group every ungrouped shape on one board). Returns group_id and member_ids; use [group_id] as shape_ids for transform, get_canvas_preview (target shapes), inspect_design, snap_to_grid, fit_to_box and align_to_artboard. Useful once a piece of artwork is finished, so later transforms cannot pull it apart.
ungroupBreak a group back into its individual shapes.
list_symbolsList every symbol (component master) in the document: id, name, viewBox. SVG Lab's Components panel is Make symbol, Place, Detach, Edit master. Call this before place_symbol so you have an id. Read design_guide 'symbols' before using any of these.
make_symbolTurn selected shapes into a reusable component master, the same as SVG Lab's 'Make a symbol'. Draw a tab-bar icon, a line-art bird, or a sitting figure ONCE, then place_symbol it on every screen so the copies stay identical. Pass a name. If the shapes were opened with edit_symbol_master, this call updates the master and every instance.
place_symbolPlace an instance of a symbol on the canvas, the same as SVG Lab's 'Place'. Give symbol_id from list_symbols (or the name) and the top-left x, y in document coordinates. Use this for repeated chrome (tab icons, avatars, a line-art figure that appears on two screens). Do NOT recreate the same pencil strokes on every artboard.
detach_symbolBreak one instance back into editable shapes, the same as SVG Lab's 'Detach'. The master is unchanged. Use this when only THIS copy should differ (a selected tab vs the others).
edit_symbol_masterOpen a symbol instance for editing the master, the same as SVG Lab's 'Edit Master'. Replaces the instance with the master's shapes, tagged for update. Edit them, then call make_symbol with those shape ids to write the master back; every instance refreshes.
set_lockedLock or unlock shapes. A locked shape stays visible but cannot be moved or edited, which is what the user means by asking you to fix something in place.
lock_artboardLock the artboard itself so its frame cannot be dragged or resized by accident. Shapes stay fully editable.
delete_shapesRemove shapes from the canvas. Undoable by the user.
undoUndo the last change, exactly as the user's Ctrl+Z would. Use this when you have just made a change the user did not want.
upload_assetPlace the USER'S OWN image file on the canvas: a picture they generated, a product shot, their logo. Give exactly one source: url (a direct https link to the file; the server fetches it, refuses private or local addresses, follows at most 3 redirects and checks the real type from the bytes), data_url (base64; practical only for small files, because every character is output you must write), or asset_id (from POST /api/v1/assets, which is how a shell agent uploads a local file with one curl; see the reply's next field). PNG, JPEG, WebP and GIF up to 4 MB land as an image in the box exactly like place_image (fit cover crops through a clipPath, contain fits whole, corner_radius, scrim for overlay text). An SVG up to 512 KB and 1500 elements is sanitised (scripts, event handlers, external links and foreignObject removed) and imported as EDITABLE shapes fitted into the box and grouped; as:"image" keeps it as one picture instead. Without width and height it keeps its natural size, shrunk to fit and centred on the artboard. Coordinates are local to artboard when given. One undo step. The reply carries layout_src ("asset:<id>", valid 24 h) to reuse the same raster as an image node or photo_card src in create_layout without sending it again. Never use this to smuggle in SVG you wrote yourself: build artwork with the drawing operations. SVG typed inline as a data_url is refused, and SVG files that read as model-written are refused too. The one exception is purpose:"pattern_tile": a small repeating tile (patterns, textures, hatching, dot fields; at most 128 units a side) that becomes a repeating pattern fill on shape_ids, never a picture on its own. For stock photography use search_photos.
纠错与举报(发现条目失效、署名有误或涉及侵权?)
提交举报 / 纠错

侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。