Skip to main content
Glama

get_bound_variables

Retrieve variable bindings for Figma design nodes to identify which variables control fills, strokes, and other properties.

Instructions

Get all variable bindings for a node. Shows which variables are bound to fills, strokes, and other properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to inspect

Implementation Reference

  • Registers the MCP tool 'get_bound_variables' using server.tool(). Includes schema validation with Zod and the handler function that sends a command to Figma and formats the response.
      "get_bound_variables",
      "Get all variable bindings for a node. Shows which variables are bound to fills, strokes, and other properties.",
      {
        nodeId: z.string().describe("The ID of the node to inspect")
      },
      async ({ nodeId }) => {
        try {
          const result = await sendCommandToFigma("get_bound_variables", { nodeId });
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result, null, 2)
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting bound variables: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • The handler function for the 'get_bound_variables' tool. It calls sendCommandToFigma to retrieve bound variables for the given nodeId and returns the result as formatted JSON text, or an error message.
    async ({ nodeId }) => {
      try {
        const result = await sendCommandToFigma("get_bound_variables", { nodeId });
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error getting bound variables: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • Input schema for the 'get_bound_variables' tool using Zod, requiring a nodeId string.
    {
      nodeId: z.string().describe("The ID of the node to inspect")
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions what the tool shows ('bound to fills, strokes, and other properties'), but doesn't cover critical aspects like whether it's a read-only operation, error handling for invalid node IDs, or the format of returned data. For a tool with zero annotation coverage, this is insufficient.

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 concise and well-structured, consisting of two sentences that efficiently convey the tool's purpose and scope without unnecessary details. Every sentence adds value, making it front-loaded and easy to understand.

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?

Given the tool's complexity (simple read operation with one parameter), no annotations, and no output schema, the description is moderately complete. It explains what the tool does but lacks details on behavioral traits and output format. This is adequate for a basic tool but leaves gaps that could hinder effective use by an AI agent.

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?

The input schema has 100% description coverage, with 'nodeId' clearly documented as 'The ID of the node to inspect'. The description adds no additional parameter semantics beyond this, such as examples or constraints. According to the rules, when schema coverage is high (>80%), the baseline score is 3, which is appropriate here.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get all variable bindings for a node' with specific details about what it shows ('which variables are bound to fills, strokes, and other properties'). It uses a specific verb ('Get') and resource ('variable bindings'), but doesn't explicitly distinguish it from siblings like 'resolve_variable_by_name' or 'clear_variable_binding', which prevents a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a valid node ID, or compare it to sibling tools like 'resolve_variable_by_name' for specific variable resolution. This lack of contextual usage information results in a low score.

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