Skip to main content
Glama
sand1018

figma-context-mcp-server

by sand1018

分析 Figma 节点结构

figma_analyze_structure
Read-onlyIdempotent

Analyze a Figma node to retrieve structured semantic JSON without screenshots, ideal for supplementing existing screenshots with detailed layout, CSS, and pattern data.

Instructions

仅获取结构化分析 JSON(不含截图)。适合在已有截图的情况下补充获取结构数据。

输出包含:容器聚合、精确 CSS 样式、布局方向推断、重复模式检测、资源 URL 列表。

Args:

  • node_id (string, 必填): Figma 节点 ID

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

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description adds real value by listing the analysis categories produced (container aggregation, CSS styles, layout inference, repeated-pattern detection, resource URLs) and reaffirming no screenshot is returned.

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?

Front-loaded with the key differentiator (JSON only, no screenshot), then output contents, Args, and Returns in a scan-friendly layout. Minor redundancy between the '输出包含' list and the 'Returns' line, but no wasted 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?

With no output schema, the description carries the burden of describing returns and does so adequately via the analysis categories. For a single-parameter read tool with full annotation coverage, nothing critical is missing, though it could note behavior for large/deep nodes.

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 100% and the schema already explains extraction from the Figma URL node-id parameter in more detail than the description. The description merely restates node_id as required, adding nothing beyond the structured field, so the baseline 3 applies.

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 states a specific verb+resource (get structured analysis JSON for a Figma node) and explicitly excludes screenshots, which distinguishes it cleanly from figma_get_screenshot. It enumerates what the analysis contains, so an agent knows exactly what it returns without opening a schema.

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?

It names the condition for use — '适合在已有截图的情况下补充获取结构数据' (use when a screenshot already exists and you want supplementary structural data) — and rules out screenshot retrieval. It doesn't cite sibling tools by name, so the routing is implied rather than explicit.

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