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.",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('Remove') and outcome ('reverting to static value'), but doesn't specify permissions required, whether the operation is reversible, error conditions, or what happens if no binding exists. For a mutation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description adequately covers the basic purpose but lacks details on behavioral aspects like error handling or side effects. Given the 2-parameter input with full schema coverage, it's minimally viable but could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description doesn't add any additional meaning about nodeId or field beyond what the schema provides, so it meets the baseline of 3 when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Remove a variable binding'), target resource ('from a node property'), and outcome ('reverting to the static value'). It distinguishes itself from siblings like set_fill_variable or set_stroke_variable by focusing on removal rather than assignment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a variable binding needs to be cleared from a node property, but doesn't explicitly state when to use this tool versus alternatives like directly setting static values with other sibling tools (e.g., set_fill_color). No explicit exclusions or prerequisites are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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