Skip to main content
Glama

List library variables

figma_get_library_variables
Read-only

Read variables from team libraries enabled in the Figma file: list collections, filter variables by name or type, and get keys to import before binding.

Instructions

Variables from the team libraries enabled in this file — the part of a library a plugin can list (its components and styles it cannot). Without collectionKey: the enabled libraries' variable collections { key, name, libraryName }. With one: that collection's variables { key, name, resolvedType }, filtered by query (name substring) and type, paginated. Import a variable by its key before binding it. Local variables: figma_get_variable_defs. UNSUPPORTED means the plugin lacks the teamlibrary permission or no library is enabled (Assets → Libraries). Reads only. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNoMax variables. Default 200.
queryNoName substring, case-insensitive (collections: name or library name).
cursorNoThe nextCursor of a truncated call, unchanged.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
collectionKeyNoA collection key from a call without it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint/destructiveHint/openWorldHint annotations, it adds real behavioral context: an explicit 'Reads only.' restatement for emphasis, a named permission dependency (teamlibrary), a defined error state (UNSUPPORTED) with causes and remediation, and per-editor support status (Design verified; FigJam/Slides unverified).

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, dense, and free of filler — nearly every clause carries a distinct fact (scope boundary, mode split, return shapes, filters, import rule, sibling, error state, editor support). The em-dash-packed single paragraph is efficient but harder to skim than a short bulleted split would be.

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?

With no output schema, the description carries the full burden of describing returns, and it does: { key, name, libraryName } for collections and { key, name, resolvedType } for variables, plus truncation/cursor behavior. Nothing an agent needs to call this correctly is missing.

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 83%, so the baseline is 3, and the description still clarifies the highest-risk semantic: collectionKey switches the entire result shape and paging behavior between collections and variables. It also explains that `query` matches name or library name on collections and that results are paginated. The remaining params (limit, cursor, session) 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?

Starts with a specific verb+resource (variables from team libraries enabled in this file) and immediately scopes it against the rest of a library ('its components and styles it cannot'). It is unambiguously distinguishable from figma_get_variable_defs, which it explicitly names as the local-variables counterpart.

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?

States the two operating modes (without collectionKey vs. with one), routes local-variable lookups to figma_get_variable_defs, explains the import-before-bind prerequisite, and defines the UNSUPPORTED condition with its likely causes (missing teamlibrary permission or no library enabled, with the Assets → Libraries remedy). When/why-not coverage is essentially complete.

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