Skip to main content
Glama

Export code

export_code
Read-only

Code for screens (frames) or elements: React components (TSX), Vue single-file components, or standalone HTML pages, styled with the same Tailwind v4 classes. Template rows become a data array and a loop, components (data-component / data-use) one component each with typed props, Lucide icons lucide-react / lucide-vue-next imports, workspace images absolute URLs. Returns the files (path + content), the npm dependencies and notes (fonts, images, prototype links to wire). Screens of a flow exported together share their components, which come once. The code is a faithful translation of the design, not yet adapted to a codebase's own components, design tokens, routing or data.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileId": "<fileId>",
      "nodeIds": "<nodeIds>"
    },
    "name": "export_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileIdYes
nodeIdsYesFrames (screens) or elements to export (see get_file, find_nodes).
frameworkNo"react" (TSX function components), "vue" (<script setup lang="ts"> SFCs) or "html" (one standalone page per screen, everything resolved, Tailwind from its CDN).react

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a read-only, non-destructive, closed-world operation, and the description goes well beyond that by describing shared-component deduplication across a flow, template-row-to-data-array transformation, data-component/data-use handling, icon library imports, and absolute image URLs. It also sets an honest expectation that the output is a faithful translation not yet adapted to the consumer's codebase. What it does not cover is size limits or performance characteristics for large exports.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: output formats and artifacts come first, transformation rules and caveats after. The sentences are long and comma-heavy, but nearly every clause carries distinct information rather than restating the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must carry the return shape — and it does, listing files (path + content), npm dependencies, and notes about fonts, images, and prototype links. Combined with the explicit statement of limitations, an agent has enough to decide to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 67% schema coverage, the schema already documents the framework enum and nodeIds. The description adds meaning by clarifying that nodeIds accepts frames/screens or elements and that grouping screens from one flow yields shared components — semantics the schema does not convey. It omits the 30-item cap, but the schema states that explicitly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Code for screens (frames) or elements') and enumerates exactly what is produced: React TSX components, Vue SFCs, or standalone HTML with Tailwind v4 classes. This is clearly distinguishable from sibling retrieval tools like get_html or get_specs because it names the emitted artifacts rather than a stored representation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: export applies to frames/screens or individual elements, and the nodeIds param points to get_file and find_nodes for discovery. It does not explicitly state when to prefer get_html, edit_html, or static_map instead, so the alternatives routing is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.