Skip to main content
Glama
andreycretsu

Cursor Talk to Figma MCP

by andreycretsu

get_annotations

Retrieve design annotations from Figma documents to understand feedback, specifications, and context for specific nodes or entire files.

Instructions

Get all annotations in the current document or specific node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoOptional node ID to get annotations for specific node
includeCategoriesNoWhether to include category information

Implementation Reference

  • Handler function that forwards the get_annotations request to the Figma plugin via sendCommandToFigma and formats the response as MCP content.
    async ({ nodeId, includeCategories }) => {
      try {
        const result = await sendCommandToFigma("get_annotations", {
          nodeId,
          includeCategories
        });
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error getting annotations: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • Zod schema defining input parameters: optional nodeId (string) and includeCategories (boolean, default true).
    {
      nodeId: z.string().optional().describe("Optional node ID to get annotations for specific node"),
      includeCategories: z.boolean().optional().default(true).describe("Whether to include category information")
    },
  • MCP tool registration for 'get_annotations' using McpServer.tool(), including name, description, input schema, and inline handler.
    // Get Annotations Tool
    server.tool(
      "get_annotations",
      "Get all annotations in the current document or specific node",
      {
        nodeId: z.string().optional().describe("Optional node ID to get annotations for specific node"),
        includeCategories: z.boolean().optional().default(true).describe("Whether to include category information")
      },
      async ({ nodeId, includeCategories }) => {
        try {
          const result = await sendCommandToFigma("get_annotations", {
            nodeId,
            includeCategories
          });
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result)
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting annotations: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Get all annotations' but doesn't disclose behavioral traits such as whether this is a read-only operation (implied by 'get'), potential permissions needed, rate limits, pagination, or what happens if no document is open. The description adds minimal context beyond the basic action.

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?

The description is a single, efficient sentence with zero waste. It front-loads the core action ('Get all annotations') and specifies scope ('in the current document or specific node') concisely. Every word earns its place, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is incomplete. It lacks context on behavioral aspects (e.g., read-only safety, error conditions), output format (what 'annotations' include), and usage guidelines. For a tool in a design/UI context with many sibling tools, more guidance is needed to help an agent use it correctly.

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%, so the schema fully documents both parameters (nodeId and includeCategories). The description adds no additional meaning beyond implying 'nodeId' targets a 'specific node' and 'all annotations' might default to the current document. Baseline 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate with extra insights like parameter interactions or default behaviors.

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 'Get' and resource 'annotations', specifying scope with 'in the current document or specific node'. It distinguishes from siblings like 'set_annotation' (write vs read) and 'get_document_info' (annotations vs general info), though not explicitly named. However, it doesn't fully differentiate from all siblings like 'get_reactions' or 'get_styles' which are also read operations on document elements.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an open document), exclusions, or compare to siblings like 'get_document_info' (which might include annotations) or 'scan_nodes_by_types' (which might filter nodes). Usage is implied by the name and purpose but not explicitly stated.

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/andreycretsu/cursor-talk-to-figma-mcp-main'

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