Skip to main content
Glama

get_instance_overrides

Extract override properties from a Figma component instance to apply them to other instances, enabling consistent design updates across multiple elements.

Instructions

Get all override properties from a selected component instance. These overrides can be applied to other instances, which will swap them to match the source component.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoOptional ID of the component instance to get overrides from. If not provided, currently selected instance will be used.

Implementation Reference

  • Registration of the 'get_instance_overrides' MCP tool, including Zod input schema, description, and inline handler function that proxies the command to the Figma plugin via sendCommandToFigma.
    server.tool( "get_instance_overrides", "Get all override properties from a selected component instance. These overrides can be applied to other instances, which will swap them to match the source component.", { nodeId: z.string().optional().describe("Optional ID of the component instance to get overrides from. If not provided, currently selected instance will be used."), }, async ({ nodeId }) => { try { const result = await sendCommandToFigma("get_instance_overrides", { instanceNodeId: nodeId || null }); const typedResult = result as getInstanceOverridesResult; return { content: [ { type: "text", text: typedResult.success ? `Successfully got instance overrides: ${typedResult.message}` : `Failed to get instance overrides: ${typedResult.message}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error copying instance overrides: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • TypeScript interface defining the expected result structure from the Figma plugin for get_instance_overrides.
    interface getInstanceOverridesResult { success: boolean; message: string; sourceInstanceId: string; mainComponentId: string; overridesCount: number; }
  • Handler function for the get_instance_overrides tool. Sends the command to Figma plugin, casts result to typed interface, and formats response content.
    }, async ({ nodeId }) => { try { const result = await sendCommandToFigma("get_instance_overrides", { instanceNodeId: nodeId || null }); const typedResult = result as getInstanceOverridesResult; return { content: [ { type: "text", text: typedResult.success ? `Successfully got instance overrides: ${typedResult.message}` : `Failed to get instance overrides: ${typedResult.message}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error copying instance overrides: ${error instanceof Error ? error.message : String(error)}` } ] }; } }
  • Zod schema for input parameters of get_instance_overrides tool.
    { nodeId: z.string().optional().describe("Optional ID of the component instance to get overrides from. If not provided, currently selected instance will be used."),

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