clear_variable_binding
Remove variable bindings from Figma node properties to revert to static values for design elements like fills, strokes, dimensions, and opacity.
Instructions
Remove a variable binding from a node property, reverting to the static value.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to modify | |
| field | Yes | The field to clear the binding from |
Implementation Reference
- Handler function that executes the clear_variable_binding tool logic by sending a command to Figma and formatting the response.async ({ nodeId, field }) => { try { const result = await sendCommandToFigma("clear_variable_binding", { nodeId, field }); const typedResult = result as { name: string }; return { content: [ { type: "text", text: `Successfully cleared ${field} variable binding from node "${typedResult.name}"` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error clearing variable binding: ${error instanceof Error ? error.message : String(error)}` } ] }; } }
- Zod schema defining the input parameters for the clear_variable_binding tool: nodeId and field.{ nodeId: z.string().describe("The ID of the node to modify"), field: z.enum(["fills", "strokes", "width", "height", "opacity", "cornerRadius"]).describe("The field to clear the binding from") },
- src/talk_to_figma_mcp/tools/modification-tools.ts:664-666 (registration)Registration of the clear_variable_binding tool with MCP server, including name and description.server.tool( "clear_variable_binding", "Remove a variable binding from a node property, reverting to the static value.",