Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_index

Index a page or subtree in document order to map node IDs, names, types, and hierarchy before inspecting details. Read-only and bounded by maxNodes, so it flags truncation.

Instructions

A compact flat index of a page or subtree, in document order: id, stable key, name, type, path, depth, visibility, size, child count, and the build root when the node is inside a figma_build/patch tree. Use it to find the shape of a page before inspecting one subtree. Read-only; stops at maxNodes and says so rather than returning a partial index that looks complete.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "figma_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileKeyNoWhich connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them.
maxDepthNo0 = root only; omitted = the whole subtree
maxNodesNoStop after this many visible nodes
rootNodeIdNoSubtree root; defaults to the current page
includeTextNoInclude a 160-character text preview for TEXT nodes
includeHiddenNoIndex hidden layers too

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.2/5.0
Behavior4/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 real work: it declares read-only semantics, document-order output, and the truncation contract ("stops at maxNodes and says so rather than returning a partial index that looks complete"). It leaves the return shape's exact serialization and any per-file auth prerequisites unstated, but the safety and truncation profile is well covered.

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?

Three sentences, zero waste: output contents first, then the usage decision, then the behavioral caveat. The most important constraint (truncation is reported, not silent) is placed last for emphasis without burying the purpose.

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?

Six optional parameters, 100% schema coverage, and no output schema — the description compensates for that gap by enumerating the returned fields, and it covers the read-only and truncation behaviors. Nothing an agent needs in order 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 100%, so the baseline is 3, and the description adds genuine meaning on top by explaining the maxNodes truncation behavior and the build-root field's conditional presence. It does not add anything for maxDepth, includeText, or includeHidden, but the schema already documents those adequately.

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?

It states a concrete verb+resource ("compact flat index of a page or subtree") and enumerates the fields returned (id, key, name, type, path, depth, visibility, size, child count, build root), so an agent knows exactly what it gets. It doesn't explicitly differentiate from the nearest sibling (figma_inspect / figma_get_layout_tree) by name, but "before inspecting one subtree" implicitly positions it as the coarse pass.

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?

"Use it to find the shape of a page before inspecting one subtree" gives a clear use context and an implied workflow ordering. It stops short of naming an alternative tool or stating when not to use it (e.g. for deep detail on one node), so it is clear but not fully routed.

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