Skip to main content
Glama
sand1018

figma-context-mcp-server

by sand1018

获取 Figma 设计变量 (Design Tokens)

figma_get_variables
Read-onlyIdempotent

Retrieve design variable definitions linked to a Figma node, including colors, spacing, and fonts, to extract design system tokens.

Instructions

获取节点关联的设计变量定义,如颜色、间距、字体等复用值。

输出示例: {'icon/default/secondary': #949494, 'spacing/md': 16px}

适合提取设计系统 token。

Args:

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

Returns: 变量定义列表。

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.5/5.0
Behavior3/5

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

注解已声明 readOnlyHint=true、idempotentHint=true 和安全特性。描述中增加了输出示例(token 键值对)和返回值描述,提供了一些操作结果透明度,但未说明速率限制、认证要求或开放世界行为等额外上下文。注解已覆盖安全特性,因此评分 3 是合适的。

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?

结构清晰,含示例、参数说明和返回值说明,句子均简洁。略有冗余(例如同时列出参数名和类型),但整体无冗长内容,且用途说明前置。

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?

对于无输出架构的简单单参数只读工具,描述补充了输出示例和返回值说明,足以让代理正确调用。但由于未解释变量可能不存在时的行为或服务限制,并未达到 5 分。

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?

架构描述覆盖率达 100%,因此参数已在模式中完整记录(包括从 Figma URL 提取的提示)。描述中列出了参数名和类型,但并未超出模式提供额外含义。在模式承担主要说明的情况下,3 分符合基准。

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?

明确以动词+资源开头('获取...设计变量定义')并提供具体示例(颜色、间距、字体)。它并未明确区分兄弟姐妹工具如 figma_get_page_context,但核心意图是清晰的。

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?

提到'适合提取设计系统 token',给出了隐含的使用场景,但未指明何时使用或不使用此工具,也未提及替代方案(例如,获取页面上下文或截图)。

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