Skip to main content
Glama
OpenFigma MCP

OpenFigma MCP

by Shivam990q

transpile_code_to_canvas

Converts HTML, JSX, or Tailwind snippets into native Figma scenegraph nodes for bidirectional canvas synthesis.

Instructions

Transpiles HTML / JSX / Tailwind code into native Figma scenegraph nodes for bidirectional canvas synthesis.

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": {
      "code": "<code>"
    },
    "name": "transpile_code_to_canvas"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesHTML, JSX, or Tailwind snippet

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, yet it only says the tool transpiles code into Figma nodes. It does not disclose whether this inserts, replaces, or mutates canvas content, whether permissions are required, or what side effects to expect.

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?

The definition is a single, front-loaded sentence with no redundant setup. However, 'for bidirectional canvas synthesis' is somewhat vague jargon that adds little actionable clarity.

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

Completeness2/5

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

For a canvas-mutating transpilation tool with no annotations and no output schema, the description is thin: it does not explain the return value, resulting node structure, or error behavior. It identifies the transformation but leaves too much unspecified for confident invocation.

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

Parameters3/5

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

The schema already has 100% description coverage and states that 'code' accepts 'HTML, JSX, or Tailwind snippet'. The description repeats those accepted formats rather than adding syntax, size, or formatting constraints, so the schema remains the primary source of parameter meaning.

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

Purpose4/5

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

The description states a specific verb ('Transpiles') and concrete source and target resources: HTML/JSX/Tailwind code into native Figma scenegraph nodes. It does not distinguish this from close siblings such as canvas_insert_code, so the purpose is clear but lacks sibling differentiation.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit guidance on when to use it rather than alternatives like canvas_insert_code or generate_code. 'Bidirectional canvas synthesis' hints at a scenario but does not establish conditions, exclusions, or prerequisites.

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