Skip to main content
Glama

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
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to modify
fieldYesThe 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") },
  • 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.",

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/agenisea/cc-fig-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server