Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

get_annotation

Retrieve feedback and comments attached to a specific Figma design element by providing its node ID.

Instructions

Read annotations from a node in Figma. Uses the proposed Annotations API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to read annotations from

Implementation Reference

  • The handler function that registers and implements the 'get_annotation' tool. It takes a nodeId parameter, calls sendCommandToFigma to retrieve annotations from a Figma node, and returns the node name and annotations as JSON text.
    server.tool(
      "get_annotation",
      "Read annotations from a node in Figma. Uses the proposed Annotations API.",
      {
        nodeId: z.string().describe("The ID of the node to read annotations from"),
      },
      async ({ nodeId }) => {
        try {
          const result = await sendCommandToFigma("get_annotation", { nodeId });
          const typedResult = result as { name: string; annotations: any[] };
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({ name: typedResult.name, annotations: typedResult.annotations }, null, 2),
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting annotations: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
  • The tool is registered via server.tool() with the name 'get_annotation'. Registration and handler are in the same call.
    server.tool(
      "get_annotation",
      "Read annotations from a node in Figma. Uses the proposed Annotations API.",
      {
        nodeId: z.string().describe("The ID of the node to read annotations from"),
      },
      async ({ nodeId }) => {
        try {
          const result = await sendCommandToFigma("get_annotation", { nodeId });
          const typedResult = result as { name: string; annotations: any[] };
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({ name: typedResult.name, annotations: typedResult.annotations }, null, 2),
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting annotations: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
  • The 'get_annotation' string literal is included in the FigmaCommand union type, serving as a type-level schema for valid commands that can be sent to Figma.
    | "set_annotation"
    | "get_annotation"
    | "get_variables"
    | "set_variable"
    | "apply_variable_to_node"
    | "switch_variable_mode"
    | "get_figjam_elements"
    | "create_sticky"
    | "set_sticky_text"
    | "create_shape_with_text"
    | "create_connector"
    | "create_section";
Behavior2/5

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

Without annotations, the description must carry the full burden. It mentions using the 'proposed Annotations API', which hints at experimental status, but does not disclose read-only nature (implied), permissions needed, or any side effects. Further behavioral details are missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, each adding value: the first states the core purpose, the second adds important context about the API status. No extraneous words.

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

Completeness3/5

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

For a simple read tool with one parameter, the description covers the basic purpose. However, it lacks information about the return value (what format the annotations come in) and any pagination or limitations, making it minimally complete.

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 coverage is 100% with one parameter (nodeId) described. The description adds no further meaning beyond what the schema already provides, so it meets the baseline but does not exceed it.

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 clearly states the verb 'read' and the resource 'annotations from a node', providing a specific action and target. It distinguishes from the sibling 'set_annotation' implicitly through the verb, but does not explicitly differentiate, which would warrant a 5.

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?

No guidance is provided on when to use this tool versus alternatives like 'set_annotation'. There is no mention of prerequisites, context, or typical use cases, leaving the agent without decision support.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arinspunk/claude-talk-to-figma-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server