Skip to main content
Glama

get_reactions

Retrieve Figma prototyping reactions from specified nodes to analyze user interactions and prepare data for creating connector lines between design elements.

Instructions

Get Figma Prototyping Reactions from multiple nodes. CRITICAL: The output MUST be processed using the 'reaction_to_connector_strategy' prompt IMMEDIATELY to generate parameters for connector lines via the 'create_connections' tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdsYesArray of node IDs to get reactions from

Implementation Reference

  • The main handler function for the 'get_reactions' MCP tool. It calls sendCommandToFigma to retrieve prototyping reactions from specified node IDs in Figma, returns the JSON result as text content, includes an important instruction for next steps, and sets a follow-up prompt 'reaction_to_connector_strategy'.
    async ({ nodeIds }) => {
      try {
        const result = await sendCommandToFigma("get_reactions", { nodeIds });
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result)
            },
            {
              type: "text",
              text: "IMPORTANT: You MUST now use the reaction data above and follow the `reaction_to_connector_strategy` prompt to prepare the parameters for the `create_connections` tool call. This is a required next step."
            }
          ],
          followUp: {
            type: "prompt",
            prompt: "reaction_to_connector_strategy",
          },
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error getting reactions: ${error instanceof Error ? error.message : String(error)
                }`,
            },
          ],
        };
      }
    }
  • The input schema for the 'get_reactions' tool, defining 'nodeIds' as an array of strings using Zod validation.
      nodeIds: z.array(z.string()).describe("Array of node IDs to get reactions from"),
    },
  • The registration of the 'get_reactions' tool on the MCP server using server.tool(), including name, description, schema, and handler.
    server.tool(
      "get_reactions",
      "Get Figma Prototyping Reactions from multiple nodes. CRITICAL: The output MUST be processed using the 'reaction_to_connector_strategy' prompt IMMEDIATELY to generate parameters for connector lines via the 'create_connections' tool.",
      {
        nodeIds: z.array(z.string()).describe("Array of node IDs to get reactions from"),
      },
      async ({ nodeIds }) => {
        try {
          const result = await sendCommandToFigma("get_reactions", { nodeIds });
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result)
              },
              {
                type: "text",
                text: "IMPORTANT: You MUST now use the reaction data above and follow the `reaction_to_connector_strategy` prompt to prepare the parameters for the `create_connections` tool call. This is a required next step."
              }
            ],
            followUp: {
              type: "prompt",
              prompt: "reaction_to_connector_strategy",
            },
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting reactions: ${error instanceof Error ? error.message : String(error)
                  }`,
              },
            ],
          };
        }
      }
    );
Behavior4/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. It adds valuable context by specifying that the output must be processed immediately for use with another tool ('create_connections'), which is a critical behavioral trait not covered by any structured fields. However, it doesn't mention potential limitations like rate limits or authentication needs.

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 extremely concise and front-loaded, consisting of just two sentences that efficiently convey the tool's purpose and critical usage instructions. Every sentence earns its place by providing essential information without any waste or redundancy.

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

Completeness4/5

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

Given the complexity (a read operation with no annotations and no output schema), the description is reasonably complete. It explains the purpose and critical post-processing step, but it doesn't detail the output format or potential errors, which could be helpful for an AI agent. However, the strong usage guidelines partially compensate for this gap.

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?

The input schema has 100% description coverage, with the parameter 'nodeIds' clearly documented as an array of node IDs. The description doesn't add any additional meaning beyond this, such as explaining what node IDs are or how to obtain them, so it meets the baseline for high schema coverage without extra value.

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 ('Figma Prototyping Reactions from multiple nodes'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_annotations' or 'get_node_info', which also retrieve information but for different data types, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool by stating that the output MUST be processed using 'reaction_to_connector_strategy' prompt to generate parameters for the 'create_connections' tool. This clearly defines the intended workflow and alternative tools involved, offering strong contextual direction.

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