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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / nodeIds
      Added value: +{
      +  "description": "Array of node IDs to get reactions from",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / required
      Added value: +[
      +  "nodeIds"
      +]
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the critical behavioral requirement that the output must be post-processed, which adds useful beyond-schema context. However, it does not describe the output format, potential errors, or other behaviors, so it's only moderately transparent.

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 two sentences: the first states purpose, the second delivers a critical instruction. No filler words, front-loaded and easy to parse.

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?

The tool is simple (one parameter, no output schema), and the description covers the essential workflow step (post-processing to generate connectors). It does not explain the return value structure, but the critical instruction provides enough context for an agent to proceed. This is slightly above average given the tool's simplicity.

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 coverage is 100% for the single parameter 'nodeIds', and the description already provides a brief meaning ('Array of node IDs'). The description adds no further detail about how nodeIds affect the result, so it meets the baseline but does not exceed it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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') with a specific scope ('from multiple nodes'). This distinguishes it from sibling tools like get_node_info or get_annotations, which target different types of data.

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

Usage Guidelines4/5

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

The description provides clear context on how to use the tool: its output must be processed using the 'reaction_to_connector_strategy' prompt and fed into 'create_connections'. It doesn't explicitly compare with alternatives, but it establishes a concrete workflow, which is strong usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.