mcp__applyDesign
Finalize generated design code: replace ALL placeholders (SVG icons + long text) with real high-precision data from the design cache, then write the final file directly to disk.
WHAT it does:
- Replaces every
@@SVG:{svgShortKey}@@placeholder with the real high-precision<svg>markup from the SVG cache (character-for-character exact, no rounding). - Replaces every
T{sectionIndex}|{nodeId}text placeholder with the real long text from the text cache. - Detects fabricated (hand-written)
<path d="...">that were NOT injected via placeholders — reports them as errors. - Writes the finalized code directly to
{outDir}/{outputFileName}on disk.
CRITICAL — outDir is MANDATORY: Always provide outDir so the finalized code is written directly to disk. This ensures the server-injected data reaches the file WITHOUT any LLM re-processing. Do NOT copy the code back into your response and re-output it — that causes precision loss. The file written by this tool IS the final deliverable.
PLACEHOLDER FORMATS:
- SVG icons:
@@SVG:{svgShortKey}@@— svgShortKey comes from the PATH node's svgShortKey field in the section DSL. Example: <span class="icon">@@SVG:S0#0@@</span> - Long text:
T{sectionIndex}|{nodeId}— appears in TEXT nodes whose text was too long for inline DSL. Example: <p>T3|1:1234:5678</p>
The server escapes the injected data according to the targetLang parameter:
html(default, also for Vue templates): place the placeholder in element content (<span>@@SVG:S0#0@@</span>,<p>T3|1:2</p>). SVG is inserted as-is; long text is HTML-escaped (& < >).dart(Flutter): place the placeholder inside a single-quoted string literal (SvgPicture.string('@@SVG:S0#0@@'),Text('T3|1:2')). SVG/text are escaped for that string (\ ' newline). PasstargetLang: "dart".
Pick targetLang to match the code you generated, and place placeholders in that language's standard position shown above.
You can provide either:
- fileId and layerId directly, or
- a short link (like https://{domain}/goto/LhGgBAK)
IMPORTANT: Call this tool with the COMPLETE code string. After the tool writes the file, you are DONE — do NOT output or edit the code further.