localfig
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOCALFIG_OUT | No | Where figma_export writes. | ~/.localfig/exports |
| LOCALFIG_HOME | No | Where the token, plugin and exports live. | ~/.localfig |
| LOCALFIG_PORT | No | The port for the local bridge. Also change networkAccess in the manifest and re-import the plugin. | 8765 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| figma_statusA | Bridge + plugin health: is the Figma plugin connected, which file/page is open, current selection, and whether dynamic code execution is available. |
| figma_evalA | Run JavaScript inside the Figma plugin sandbox, against the file where the bridge plugin is running.
helpers: setText(node, chars), loadNodeFonts(node), createText({characters, font:{family,style}, fontSize, color:"#hex", width, lineHeight(%), letterSpacing(px), textCase, textAlign, name, parent, x, y}), rgb("#hex"), set(node, props), query(root, selector), createAutoLayout(dir, props), reveal(nodes), notify(msg), rgba("#hex8"), collection(name, [modes]), token(collection, name, "COLOR"|"FLOAT"|"STRING"|"BOOLEAN", value | {mode: value}), bind(node, "fills"|"strokes"|prop, variable), importComponent(key), instance(key, parent, props), command(kind, payload) — runs a typed command (tokens, metadata, find, changes...) from inside eval and returns {result}. |
| figma_metadataA | Structural dump of a node subtree (id, name, type, x/y/w/h, text characters). Omit nodeId for the current page. Cheap way to find node IDs before editing. Pass styles:true to also get fills, strokes, effects, opacity, corner radius, auto-layout and text styles per node — plus bound variables (token names), named styles, and for instances the main component and its property values. css:true adds the CSS Figma computes per node. |
| figma_exportA | Export nodes to local files. PNG/JPG (up to 2 MB each) are attached inline as images — the screenshot path. JSON = the subtree in Figma REST API shape (JSON_REST_V1), for design-to-code tooling; SVG and JSON also come back inline as text (up to 200 KB). |
| figma_tokensA | Design tokens and styles of the open file: every local variable collection with its modes and per-mode values (colors as hex, aliases as {name}), plus local paint/text/effect styles. Read this before generating code or building on a design system; figma_metadata with styles:true then tells you what each node is bound to. |
| figma_findA | Search the current page (or all pages) for nodes by type, layer-name pattern and/or text content. Returns ids, names and positions — the way to locate things in a big file before editing. |
| figma_changesA | What changed in the file since a previous call: node creations, deletions and property changes recorded by the plugin, with a per-node summary. Changes made by tool calls are tagged byPlugin (heuristic: they arrive during, or within 2 s after, a mutating call) and hidden by default, so this shows what the person edited in Figma between your calls. Pass back the returned seq as since. |
| figma_historyA | snapshot: save a named version to the file's version history — a restore point before risky edits. undo: revert the edits of the last mutating tool call (figma_eval / figma_place_image / library import) if it ran within the last 60 s; after that they are committed to the file's undo history as one step per call, where the person can Ctrl+Z them. |
| figma_libraryA | Team library access (the plugin manifest asks for the "teamlibrary" permission). collections: list the library variable collections available to this file. variables: list the variables in one collection (collectionKey). import: bring a component / componentSet / style / variable into the file by its library key; for components, instance:true also places an instance (figma_metadata reports component keys on instances). |
| figma_place_imageA | Put a local image file into a node as an image fill. Any format the browser decodes (PNG, JPG, WebP, GIF, BMP, AVIF...): images over 4096px per side are downscaled automatically in the plugin UI and non-native formats are converted to PNG. The result reports what was done (prepared). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool targets a clearly distinct concern: connection status, arbitrary plugin execution, structural metadata, design tokens, search, change tracking, history, library access, export, and image placement. Even the overlap between metadata and find is resolved by their descriptions: metadata dumps subtree structure, find locates nodes by criteria.
All tools share the figma_ prefix, which makes the family recognizable. There is slight inconsistency in grammatical form—nouns like figma_metadata and figma_tokens versus verbs like figma_find and figma_place_image—but the pattern is still predictable and readable.
Ten tools is well within the ideal 3–15 range and matches the server's scope: a Figma bridge needs status, inspection, mutation, search, history, assets, and library access. Each tool earns its place without redundancy or bloat.
The surface covers the full workflow: inspect the file, find nodes, read tokens, run arbitrary mutations via figma_eval, track changes, snapshot/undo, import from libraries, export files, and place images. figma_eval acts as a well-documented escape hatch for anything not explicitly exposed, so there are no obvious dead ends.