Skip to main content
Glama

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)}` } ] }; } } );

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