get_reactions
Retrieve Figma prototyping reactions from multiple nodes to analyze user interactions. Process the output immediately using 'reaction_to_connector_strategy' to generate connector line parameters for the 'create_connections' tool.
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:2339-2376 (registration)Registration of the 'get_reactions' tool with the MCP server, including name, description, input schema, and handler function.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) }`, }, ], }; } } );
- The handler function that proxies the get_reactions request to the Figma plugin via sendCommandToFigma and returns the result as text content with a follow-up prompt.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) }`, }, ], }; } }
- Zod schema for the input parameters: an array of node IDs.{ nodeIds: z.array(z.string()).describe("Array of node IDs to get reactions from"), },
- TypeScript type definition for the get_reactions command parameters in CommandParams.get_reactions: { nodeIds: string[] };
- src/talk_to_figma_mcp/server.ts:2583-2583 (registration)Inclusion of 'get_reactions' in the FigmaCommand type union.| "get_reactions"