Skip to main content
Glama

Get design context

figma_get_design_context
Read-only

Retrieve a Figma node tree with layout, styles, variables, and components for AI agents to build accurate designs from the open file.

Instructions

READ THIS BEFORE YOU BUILD OR CODE. The design as a designer sees it: one tree with, per node, size, position, auto-layout (gap, padding, alignment, wrap row gap, grid tracks, hug/fixed/fill, min/max), constraints, fills (gradient angles, image hashes) / strokes / effects / radius, text with its styled runs and links, styles and variables BY NAME, explicit variable modes, and an instance's component with its keys. stylesUsed / variablesUsed / componentsUsed list the tokens and components met, with ids and keys. FigJam: sticky, shape, connector (endpoints as the connector tools write them), table cells and code blocks, plus connectors, the board's edges. Slides: each slide's row, column and index. No nodeId: every selected layer (roots), else the page — in a deck the focused slide, else its outline; scope says which. Bounded by maxNodes: truncated: true and nextCursor return the rest. Text is cut at maxTextChars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoLevels to descend: 0 is the node alone. Default 8 (a whole screen).
cursorNoThe nextCursor of a truncated call, unchanged.
nodeIdNoSubtree root: node id or a Figma link. Defaults to the selection, then the current page (in Slides the focused slide).
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
absoluteNoAdd `abs` per node: its box on the page (x/y are relative to the parent). Default false.
maxNodesNoStop after this many nodes. Default 500.
includeCssNoPer-node CSS from Figma's inspect panel (getCSSAsync). Default false; slower.
maxTextCharsNoCharacters of text shown per node. Default 400.
includeStylesNoStyle names, text runs and instance components. Default true.
maxTableCellsNoFigJam table cells read per table before it is cut (tableNote). Default 500.
includeGeometryNoSize, position, auto-layout, constraints, radius, opacity. Default true.
includeVariablesNoBound variable names and values, explicit modes. Default true.
includeAnnotationsNoPer-node annotations (label, category). Default true.
maxChildrenPerNodeNoCap on children per node. Default 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already establish the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false), so the lower bar applies. The description nonetheless adds real operational context: truncation with truncated:true plus nextCursor to resume, maxNodes/maxTextChars/table-cell cutoffs, and that includeCss is slower. However the calibration for read-only annotated tools topped out at 3 when return-format and pagination behavior were absent; here truncation is covered but the description remains a payload inventory rather than disclosing limits such as rate, file-size, or permission requirements. A 3 is the honest landing point.

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?

The imperative warning is front-loaded and virtually every clause carries distinct facts about scope, payload, or truncation. The cost is readability: a single unbroken paragraph of semicolon-separated inventories makes it hard to scan for one specific behavior, so it falls short of a 5.

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 14-parameter tool with no output schema, the description effectively serves as the return contract, enumerating node fields, token/component use lists, FigJam and Slides specifics, and the scope flag. Combined with truncation and cursor semantics, an agent has everything needed to call it correctly without further reference.

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?

With 100% schema description coverage the baseline is 3, but the description earns an extra point by explaining cross-parameter behavior the schema cannot: maxNodes produces truncated:true and nextCursor, and cursor is "the nextCursor of a truncated call, unchanged," which is the resumption contract. It does not add meaning for depth, absolute, session, or the include* toggles beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb+resource and enumerates the exact payload (per-node geometry, auto-layout, fills/strokes/effects/radius, styled text runs, styles and variables by name, FigJam/Slides structures), so an agent knows exactly what it will get. It never explicitly disambiguates from the many overlapping read siblings (figma_get_node, figma_get_nodes_info, figma_get_metadata), so it stops short of a 5.

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?

"READ THIS BEFORE YOU BUILD OR CODE" is a clear, front-loaded directive on when to reach for this tool. It also explains default scope resolution (selection → page → focused slide) which tells the agent what it will get without arguments. It names no alternative or when-not condition, so no 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