Skip to main content
Glama
paragdesai1

Cursor Talk to Figma MCP

by paragdesai1

get_annotations

Retrieve design annotations from Figma documents to access feedback, comments, and notes 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

  • Registration of the 'get_annotations' MCP tool, including inline schema definition and handler function. The handler forwards the request to the Figma plugin via sendCommandToFigma and returns the result as a text content block.
    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)}`
              }
            ]
          };
        }
      }
    );
  • The handler function executes the tool logic by calling sendCommandToFigma with the 'get_annotations' command and parameters, then formats the result 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)}`
              }
            ]
          };
        }
      }
    );
  • Input schema for the get_annotations tool using Zod validation: optional nodeId and includeCategories (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")
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this is a read-only operation (implied by 'Get'), what permissions are needed, how results are structured, pagination behavior, or error conditions. The description is functional but lacks operational context needed for safe invocation.

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 that immediately conveys the core functionality without unnecessary words. It's front-loaded with the primary action and scope, making it easy to parse. Every word earns its place.

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?

For a read operation with no annotations and no output schema, the description is insufficient. It doesn't explain what 'annotations' consist of, how they're returned, whether there are limits, or what happens when no annotations exist. Given the complexity of annotation data structures, more context is needed for effective use.

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. The description mentions 'specific node' which aligns with the 'nodeId' parameter, but adds no additional semantic context beyond what's already in the schema descriptions. This meets the baseline for high schema coverage.

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' and 'set_multiple_annotations' which are write operations, but doesn't explicitly differentiate from other read tools like 'get_document_info' or 'get_node_info'.

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?

The description implies usage context by mentioning 'current document or specific node', suggesting this tool retrieves annotations rather than creating them. However, it doesn't provide explicit guidance on when to use this versus other read tools like 'get_node_info' or 'scan_nodes_by_types', nor does it mention prerequisites or exclusions.

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/paragdesai1/parag-Figma-MCP'

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