Skip to main content
Glama

Get libraries

figma_local_get_libraries
Read-only

Retrieve the design libraries linked to a Figma file—both in-use and available-to-add—so you can inspect library keys and scope design-system searches.

Instructions

Get the design libraries associated with a Figma file. Returns (1) libraries in use by the file (the libraries its component instances and styles come from) and (2) libraries available to add (the team's published libraries, when FIGMA_TEAM_ID is set). Each library has a name and library key (the library file key). The available list is paginated: pass libraries_available_to_add_next_offset back as offset. Use library keys to scope figma_local_search_design_system via includeLibraryKeys.

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": {
      "fileKey": "<fileKey>"
    },
    "name": "figma_local_get_libraries"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNoPagination offset from a previous response (libraries_available_to_add_next_offset).
fileKeyYesThe key of the Figma file to use. If a URL is provided, extract the file key from it: for https://figma.com/design/:fileKey/:fileName?node-id=1-2 the fileKey is `:fileKey`. For https://figma.com/design/:fileKey/branch/:branchKey/:fileName use the branchKey. A full URL is also accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 already cover the safety profile (readOnlyHint, openWorldHint), and the description adds genuinely new behavior: two separate result lists, a conditional dependency on the FIGMA_TEAM_ID environment variable, and the pagination contract for the available list. It does not discuss rate limits or failure modes, which keeps it below a 5.

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?

Four sentences, front-loaded with the purpose, then results, then pagination, then the cross-tool handoff. Every sentence carries distinct information and there is no filler or repetition of the title.

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 takes on the burden of explaining return values and does so: it names both lists, states that each library carries a name and library key, and identifies the next-offset field for pagination. Nothing material is missing for a two-parameter read tool.

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 the baseline is 3, but the description adds meaning beyond the schema by tying the offset parameter to the specific response field 'libraries_available_to_add_next_offset' and clarifying that only the available-to-add list is paginated. It also frames library keys as a lookup handle for another tool.

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 ('Get the design libraries associated with a Figma file') and immediately enumerates the two distinct result sets: libraries in use and libraries available to add. This is far more than a restatement of the title and lets an agent distinguish it from siblings like figma_local_search_design_system or figma_local_get_metadata.

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 real routing context: the available list only appears when FIGMA_TEAM_ID is set, and library keys are to be fed into figma_local_search_design_system via includeLibraryKeys. That is explicit downstream guidance. It stops short of a full when-not-to-use rule, so it misses the top tier.

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