Skip to main content
Glama

Text inventory

fig_text
Read-only

Extract all text content from local Figma files with layer names, page info, and typography details. Use copy audits and translation passes without traversing the document tree.

Instructions

Extract every string of copy in the file (or in one subtree via scope), in document order: guid, layer name, the characters, the page, and the base typography (font, size, line-height, colour). With includeRuns:true each node also carries its styled runs — the mixed-format spans Figma stores per UTF-16 code unit — with only the fields each run overrides. Use this for copy audits and translation passes rather than walking the tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the .fig / .figma file (absolute, or relative to the server CWD).
scopeNoOnly collect text inside this guid subtree.
cursorNoOpaque nextCursor from a previous truncated response; resumes where it stopped.
includePathNoInclude the ancestor breadcrumb per node (default false; costs tokens).
includeRunsNoInclude per-run style overrides (default false; costs many more tokens).
includeStyleNoInclude font / size / line-height / colour per node (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true, and the description does not contradict that. It adds meaningful behavior: document order, per-run style overrides for Figma's UTF-16 code-unit spans, only-overridden fields being emitted, and token-cost warnings for includeRuns and includePath. This goes well beyond the annotation signal.

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?

Two dense sentences, with the core purpose front-loaded and the usage guidance placed at the end. Every phrase earns its place; no filler or repetition of schema boilerplate.

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 burden of describing return content, and it does: document order, guid, layer name, characters, page, and base typography. It also addresses scoping, styled runs, and cost implications, making it complete enough for an agent to select and invoke the tool correctly.

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. The description adds real value beyond the schema by explaining what includeRuns actually returns (mixed-format spans per UTF-16 code unit, only overridden fields) and by describing scope's subtree filtering. This justifies a small uplift.

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?

The description opens with a specific verb and resource: 'Extract every string of copy in the file', then lists exactly what is returned (guid, layer name, characters, page, base typography). It also distinguishes itself from generic tree walking and positions it for copy audits and translation passes, clearly differentiating it from sibling tools like fig_tree and fig_find.

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?

Explicitly states when to use this tool: 'Use this for copy audits and translation passes rather than walking the tree.' This gives both a positive use case and a clear exclusion, and the mention of subtree scope tells the agent when scope applies.

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