Skip to main content
Glama
the-real-talk

the-real-talk

find_variable_usages

Discover where a Figma variable is bound across pages or under a node, returning nodeId/field usages, aliases, and styles; resume time-limited partial results with nextCursor.

Instructions

Find where a variable is bound: [{nodeId, field}] on all pages, or under rootId. Fields look like paddingTop, fills[0], strokes[0], effects[0].color. The first call also lists variableAliases (variables whose value aliases it) and styles (local styles bound to it). Instance children are skipped (their bindings belong to the main component) unless includeInstanceChildren. All pages are loaded as the search goes: PARTIAL with nextCursor when the time budget or maxResults is reached.

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": {
      "variableId": "<variableId>"
    },
    "name": "find_variable_usages"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNonextCursor of a previous PARTIAL answer, to continue where it stopped
rootIdNoLimit the search to this node (default: every page)
maxResultsNoUsages per call (default 2000)
variableIdYes
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.
includeInstanceChildrenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: it discloses that instance children are skipped by default, that the first call returns extra variableAliases and styles data, that all pages are loaded during the search, and that results can come back PARTIAL with a nextCursor when the time budget or maxResults is hit. It does not explicitly state read-only safety or performance cost of loading every page, which keeps it at 4.

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 purpose and return shape, then layered with skip rules, side outputs, and pagination semantics; nearly every clause carries information. The single dense paragraph of parenthetical asides makes it slightly hard to scan, but there is little waste.

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

Completeness5/5

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

For a six-parameter read tool with no output schema and no annotations, the description covers what is returned, what extra payload the first call carries, what is excluded, and how partial results are resumed. An agent has everything needed to call it correctly on the first attempt.

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

Parameters5/5

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

Schema coverage is 67%, and the description compensates for the undocumented parameters: it explains includeInstanceChildren's behavioral effect, rootId's scoping role, cursor's role in resuming, and the interaction of timeBudgetMs/maxResults with PARTIAL results. It also documents the field-path syntax (paddingTop, fills[0], effects[0].color), which the schema does not.

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 a specific verb and resource ('Find where a variable is bound') plus the exact return shape ([{nodeId, field}]) and the two search scopes (all pages vs rootId). This is unmistakably distinct from mutation siblings such as rebind_variable_usages or bind_variable_field.

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?

Gives concrete scope guidance: default searches every page, use rootId to narrow, set includeInstanceChildren when main-component-only is wrong, and pass cursor to resume a PARTIAL answer. It never explicitly names an alternative tool or a when-not-to-use condition, so it stops short of a 5.

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