mcp__extractSvg
Extract SVG markup from MasterGo design components by providing file and layer IDs or a short link, resolving color references and returning SVG strings for each icon.
Instructions
Extract SVG data from MasterGo design files. This tool retrieves the DSL from a design layer, finds all PATH nodes (typically inside INSTANCE/icon components), resolves their color references, and generates SVG markup strings. You can provide either:
fileId and layerId directly, or
a short link (like https://{domain}/goto/LhGgBAK) Returns { count, svgs: [{ name, id, svg }] } — one entry per icon/instance found in the design.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | No | MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided. | |
| format | No | Output format for design data. Defaults to json. - json — default; useful when piping output into tools that expect JSON. - yaml — fewer tokens than JSON for typical designs. - tree — experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings. | |
| layerId | No | Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId>). Required if shortLink is not provided. | |
| shortLink | No | Short link (like https://{domain}/goto/LhGgBAK). | |
| sourceLayerId | No | Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries. | |
| backgroundColor | No | Solid background color for the SVG (e.g. '#000000', 'black'). Useful for previewing white/light icons. |