Skip to main content
Glama
sand1018

figma-context-mcp-server

by sand1018

获取 Figma 页面完整上下文

figma_get_page_context
Read-onlyIdempotent

Retrieve a Figma node's full design context, including screenshot, semantic analysis JSON, CSS values, text, layout hierarchy, and asset URLs, to restore designs into code.

Instructions

获取指定 Figma 节点的完整设计上下文,包括:

  1. 截图(image 类型,直接可视)

  2. 结构化语义分析 JSON(容器聚合、精确样式、重复模式检测)

  3. 资源列表(所有图片 URL)

这是还原 Figma 设计稿的主入口。输出完整的结构化数据,包含精确的 CSS 值、文本内容、 图片资源 URL、容器层级关系、布局方向和重复模式标记。

Args:

  • node_id (string, 必填): Figma 节点 ID,如 "0:118" 或 "0-118"

Returns: 截图 + 结构化分析 JSON,可直接用于组件还原。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYesFigma 节点 ID,如 "0:118" 或 "0-118"。从 Figma URL 的 node-id 参数提取

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), so the bar is lower. The description still adds meaningful context beyond them: it discloses the return payload composition (a directly viewable screenshot plus a semantic JSON with CSS values, text, image URLs, container hierarchy, layout direction, and repeated-pattern flags), which is genuinely useful since no output schema exists.

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 numbered list is well front-loaded and structured, and the Args/Returns sections are clean. However, the return contents are stated twice — once in the bullet list and again in the following paragraph ('精确的 CSS 值...容器层级关系...重复模式标记') — which is avoidable repetition.

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?

With no output schema, the description carries the return-value burden and does so adequately, enumerating the three payload components and their key contents. The lone parameter is fully documented in both schema and description. It is nearly complete for a one-parameter composite read tool; only an explicit sibling comparison is missing.

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?

With a single parameter at 100% schema description coverage, the schema already documents node_id fully, including the '0:118' / '0-118' formats and the advice to extract it from the URL's node-id param. The description only repeats the same example IDs, adding no semantics beyond the schema.

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?

States a specific verb+resource (get full design context for a Figma node) and enumerates exactly what that context contains — screenshot, structured semantic JSON, and asset URLs. Calling itself 'the main entry point for restoring Figma designs' gives a clear role, though it never explicitly contrasts itself with the overlapping siblings (figma_get_screenshot, figma_analyze_structure, figma_download_assets) whose functionality it appears to bundle.

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

Usage Guidelines3/5

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

'This is the main entry point' is an implied usage signal that an agent would likely follow, but there is no explicit when-to-use vs. when-to-prefer-a-sibling guidance, despite three siblings covering screenshot, structure analysis, and asset download separately. Usage is inferable but not spelled out.

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