Skip to main content
Glama
Gawasna

figma-antigravity-mcp

by Gawasna

get_design_context

Retrieve complete design context for a Figma node, including layout, styles, component props, reference code, screenshot, and asset URLs, to convert designs into production-ready code.

Instructions

Do what: Primary READ tool for design-to-code. Returns layout, styles, component props, reference code snippet, screenshot, and asset URLs for a node. Expected output: { code (string), screenshot (URL), assets (map of download URLs), metadata }. Always prefer this over get_metadata for design inspection. Call figma_get_current_context first if you do not know the fileKey. IMPORTANT: nodeId is REQUIRED — extract from URL ?node-id=1-2 as "1:2". Never guess or pass empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesNode ID e.g. "4:84". Extract from ?node-id=4-84.
fileKeyYesFigma file key extracted from URL.
forceCodeNo
clientLanguagesNoComma-separated languages e.g. "typescript,css". Use "unknown" if unsure.
clientFrameworksNoComma-separated target frameworks e.g. "react,tailwind". Use "unknown" if unsure.
excludeScreenshotNoSet true only to preserve token budget. Default: false.
disableCodeConnectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It clearly identifies the tool as a READ operation, specifies the expected output shape ({ code, screenshot, assets, metadata }), and describes a required call-order dependency on figma_get_current_context. It doesn't mention auth/rate limits or failure modes, but for a read-only tool these gaps are minor.

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 description is organized into short labeled blocks (Do what, Expected output, IMPORTANT) and every sentence carries practical guidance. It is slightly longer than necessary but remains easy to scan and free of filler.

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

Completeness4/5

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

For a tool with 7 parameters, no output schema, and no annotations, the description provides purpose, expected output shape, usage preference, prerequisite, and required-parameter handling. It doesn't explain failure behavior or all optional-parameter effects, but the schema covers most parameter semantics and the description covers the operational essentials.

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?

Schema description coverage is 71%, and the schema already documents most parameters well (nodeId extraction, fileKey, clientLanguages, etc.). The description reinforces that nodeId is required and must not be empty, but adds little semantics beyond the schema for optional params like forceCode or disableCodeConnect.

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?

The description opens with 'Primary READ tool for design-to-code' and enumerates exactly what it returns (layout, styles, component props, reference code snippet, screenshot, asset URLs). It explicitly distinguishes itself from the sibling get_metadata with 'Always prefer this over get_metadata for design inspection,' making the tool's role unambiguous.

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?

The description states when to prefer this tool over get_metadata and gives an explicit prerequisite: 'Call figma_get_current_context first if you do not know the fileKey.' It also warns about nodeId extraction. It doesn't cover exclusions for other sibling tools (e.g., get_screenshot) but provides clear context for the main alternative.

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