Skip to main content
Glama

bind_variable_to_node

Bind a design variable to a node field such as width, height, or corner radius, or unbind it by passing null. Use bind_variable_to_paint for fills and strokes.

Instructions

Bind a variable to a node field (e.g. width, height, characters, itemSpacing, topLeftRadius, or cornerRadius to bind all four corners at once), or unbind by passing variableId: null. The variable's resolvedType must match the field's type. To bind a fill or stroke color use bind_variable_to_paint instead; get bindable variable ids from get_variable_defs. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesBindable field name, e.g. "width"
nodeIdYesNode to bind on
variableIdYesVariable id to bind, or null to remove the binding on this field

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.0
    • removedInput schema / properties / variableId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / variableId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed1 schema field changedv0.1.3
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover the safety profile (writable, non-destructive). The description adds real behavior: null means unbind, type must match field, cornerRadius binds all four corners, and it reveals the return shape { ok, nodeId }. It could go further on failure modes, but this is well beyond annotation restatement.

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

Conciseness4/5

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

Three sentences, each serving a distinct purpose, front-loaded with the core action. Slightly dense but no waste; the field list earns its space by enumerating valid values.

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

Completeness4/5

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

For a 3-param mutation tool with no output schema, the description covers action, alternative, error constraint, and return value. It does not enumerate all bindable fields exhaustively, but the schema says 'e.g.' and the description provides enough to call correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description goes beyond the schema by explaining the null semantics and the type-match constraint for variableId, and by giving the meaning of the special cornerRadius field value.

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?

States the specific action (bind/unbind a variable to a node field) and lists concrete bindable fields. The scope is narrowed immediately, and the sibling exclusion for paint binding removes ambiguity about a very similar tool.

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

Usage Guidelines5/5

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

Explicitly names alternatives and conditions: use bind_variable_to_paint for fill/stroke color, and get_variable_defs to obtain bindable ids. It also says what variableId: null does. This is close to the maximum guidance with named alternatives and prerequisites.

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

Deploy Server

Other Tools