Skip to main content
Glama
the-real-talk

the-real-talk

rebind_variable_usages

Replace one variable binding with another across matching fields under a Figma root, using a required dry run to preview changes before writing.

Instructions

Replace one variable binding by another everywhere under rootId (default: every page): every node field bound to fromVariableId is bound to toVariableId (same variable type required). fields (optional) limits to the fields of bind_variable_field, plus fills, strokes (paint colors) and effects; default all. dryRun is required: true counts and writes nothing, false writes. Returns nodesChanged, bindingsChanged, byField, sample [[nodeId, field]] (20), failures [{nodeId, name, field, error}] (200 at most, failuresTotal gives the real count). Instance children are skipped unless includeInstanceChildren. Variable aliases, local styles and text range fills are not touched (find_variable_usages lists them). Time budget: if reached, the answer is PARTIAL with nextCursor; counts are per call, add them up.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fromVariableId": "<fromVariableId>",
      "toVariableId": "<toVariableId>",
      "dryRun": "<dryRun>"
    },
    "name": "rebind_variable_usages"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNonextCursor of a previous PARTIAL answer, to continue where it stopped
dryRunYes
fieldsNo
rootIdNoLimit to this node (default: every page)
maxNodesNoNodes changed per call (default 20000)
timeBudgetMsNoTime budget of the plugin for this call in ms (default 60000, max 100000). When it is reached the answer says it is PARTIAL and gives nextCursor.
toVariableIdYes
fromVariableIdYes
includeInstanceChildrenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses dryRun semantics (true counts, false writes), what is skipped, per-call count semantics, truncated sample/failure caps, and the PARTIAL plus nextCursor time-budget behavior. This is behavior an agent could not infer from the schema alone.

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?

Front-loaded with the core action and required flags, then exclusions and return shape; nearly every clause carries information. It is dense to the point of being run-on, with several parenthetical asides, which slightly hurts scanability.

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 9-parameter mutation tool with no annotations and no output schema, the description explains return fields, caps, and partial-result continuation thoroughly. The one gap is maxNodes, which controls how much is changed per call and is undocumented in both schema and description.

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 44%, so the description must compensate and largely does: it defines the constraint that fromVariableId and toVariableId must share a type, explains fields as the bind_variable_field set plus fills/strokes/effects with default all, covers rootId default, dryRun, includeInstanceChildren, and cursor. maxNodes and the timeBudgetMs parameter name are left to the schema.

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?

Specific verb plus resource plus scope: 'Replace one variable binding by another everywhere under rootId'. It distinguishes itself from sibling reads by stating the mutation and from bind_variable_field by describing bulk replacement across all matching nodes.

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

Usage Guidelines4/5

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

Explicitly routes the agent to find_variable_usages for what this tool does not touch (aliases, local styles, text range fills) and makes clear dryRun is required to preview. It does not directly compare against bind_variable_batch, but the bulk-replace context is unambiguous.

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