Skip to main content
Glama

get_annotations

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

  • The handler function for the MCP tool 'get_annotations'. It forwards the request parameters to the Figma plugin using sendCommandToFigma and returns the result as a JSON string in text content, with error handling.
    // 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)}`
              }
            ]
          };
        }
      }
    );
  • Input schema using Zod for the 'get_annotations' tool parameters.
    {
      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")
  • Registration of the 'get_annotations' tool with the MCP server using server.tool() method.
    // Get Annotations Tool
  • TypeScript type definition for the parameters of the 'get_annotations' Figma command.
    get_annotations: {
      nodeId?: string;
      includeCategories?: boolean;
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Get all annotations' implies a read operation, it doesn't specify what format the annotations are returned in, whether there are pagination limits, authentication requirements, or error conditions. The description is minimal and lacks important operational context.

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?

The description is a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a simple retrieval tool, though it could potentially benefit from slightly more context about what 'annotations' means in this specific system.

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 tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'annotations' are in this context, what format they're returned in, or any behavioral characteristics. Given the complexity of working with document annotations and the lack of structured metadata, the description should provide more operational context.

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?

With 100% schema description coverage, the input schema already documents both parameters thoroughly. The description mentions 'specific node' which aligns with the nodeId parameter, but adds no additional semantic context beyond what the schema provides. The baseline score of 3 is appropriate when the schema does the heavy lifting.

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 action ('Get all annotations') and target resource ('in the current document or specific node'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'set_annotation' or 'set_multiple_annotations' beyond the obvious read vs write distinction.

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 when to prefer this over other annotation-related tools, nor does it provide context about prerequisites or typical use cases. The agent must infer usage from the tool name alone.

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/pipethedev/Talk-to-Figma-MCP'

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