get_instance_overrides
Retrieve override properties from a Figma component instance to apply them to other instances, enabling consistent design updates across your project.
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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_instance_overrides"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | No | Optional ID of the component instance to get overrides from. If not provided, currently selected instance will be used. |
Implementation Reference
- MCP tool handler that executes the get_instance_overrides logic by forwarding to Figma plugin via sendCommandToFigma and processing the result into a text response.
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 output structure from the Figma plugin for get_instance_overrides.
interface getInstanceOverridesResult { success: boolean; message: string; sourceInstanceId: string; mainComponentId: string; overridesCount: number; } - src/talk_to_figma_mcp/server.ts:1243-1277 (registration)MCP server.tool registration for the get_instance_overrides tool, including name, description, input schema, and handler reference.
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)}` } ] }; } } ); - Zod input schema for the get_instance_overrides tool defining the optional nodeId parameter.
nodeId: z.string().optional().describe("Optional ID of the component instance to get overrides from. If not provided, currently selected instance will be used."), },