Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FIGCRAFT_READ_ROOTSNo允许读取的目录(JSON 数组),限制 open_file[]
FIGCRAFT_WRITE_ROOTSNo允许写入的目录(JSON 数组),限制 save_file / export[]
FIGCRAFT_CONTROL_HOSTNo控制通道地址(只应在 loopback 用)127.0.0.1
FIGCRAFT_CONTROL_PORTNo控制通道端口7987
FIGCRAFT_MAX_LINE_BYTESNo单行回复上限(对齐应用的 32 MiB)33554432
FIGCRAFT_MAX_IMAGE_BYTESNo返回图片的体积上限25000000
FIGCRAFT_REQUEST_TIMEOUT_MSNo单次请求超时(应用自身上限 60s)65000

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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_commandsA

Every command the FigCraft app can run (561 of them): id, label, menu, shortcut and parameter doc. Filter with filter.

run_commandC

Run any command of the app (the same ids as the menus, shortcuts and the Actions palette): align.left, layout.add, component.create, instance.place, inspect.code, file.export, …

batchA

Several commands as one undo step (command.batch), all-or-nothing. A step may use what an earlier step returned: {"$step": n} anywhere in its params becomes the id of step n (zero-based).

create_nodeC

Create a frame, rectangle, ellipse, polygon, star, line, arrow, text, vector, section, component or slice. Coordinates are page units relative to the parent frame (the page when there is none).

set_propertiesB

Change layers: geometry, fills, strokes, effects, corner radius, auto layout, sizing, constraints, masks, handoff status, text props. Acts on ids, or on the selection when none are given.

inspect_documentB

The document as JSON: name, path, dirty flag, current page, selection, the layer tree, styles, variables, images, colour profile, the text being edited and the undo history.

get_nodeB

One layer as JSON: id, name, type, geometry, fills, strokes, effects, auto layout, sizing, constraints, text properties, component links, overrides, interactions, exports, dev status and annotations.

selectA

Replace the selection with the given layer ids (an empty array deselects).

exportB

Export layers as png, jpg, svg, webp, pdf or fig. Without path the bytes come back as image content; with path the app writes the file.

screenshotC

PNG of the page (with background) or of the given layers, scaled to fit maxSize (default 1600). window: true captures the app window, a window id that window.

open_fileC

Open a .figcraft, .json (FigCraft or REST API file JSON), .fig, .svg or image file in the app. Returns the file summary and the document outline.

save_fileB

Save the document; path is needed the first time a document is saved programmatically.

undoA

Undo the last change (one command, batch or gesture).

redoC

Redo the last undone change.

pointerC

A mouse gesture with the current tool: click, double, drag, down, move, up, hover. Positions are page coordinates; to is the drag target.

keyC

A shortcut or key as if typed on the canvas: "A", "0", "Enter", "ArrowLeft", "=", or egui names like "Plus". cmd is Cmd on macOS.

type_textB

Type into the text being edited, or replace the contents of the text layer id (the text is edited and the edit ended again).

inspect_uiB

The app state: panels, current tool, view, zoom, timings, frames drawn, the windows the app has, the live session and the home screen.

get_metadataB

The layer hierarchy in the Figma MCP shape: {id, name, type, children}. Without nodeId the current page is returned.

get_design_contextB

The design context of a layer: geometry, auto layout, sizing, fills, strokes, effects, typography, styles, variables, component links and interactions — the facts a code generator needs.

get_screenshotB

PNG of a layer (or of the current page) in the Figma MCP shape: nodeId for one layer, window: true for what the app window shows.

get_code_connect_mapA

The code connect links of the document: every component that is connected to real code, with its language, import path, name and template.

get_variable_defsB

The variables and paint styles of the document with their modes, code names and scopes — the Figma MCP shape.

get_codeC

The code the app generates for a layer: CSS, HTML+CSS, React, Leptos, SwiftUI or Jetpack Compose (a whole layer tree for html/react/leptos).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 24 tools

Disambiguation3/5

Several tools overlap: run_command can execute any app command, while create_node, set_properties, pointer, key, and type_text enable specific actions. Multiple inspection and capture tools (get_node, get_metadata, get_design_context, inspect_document, screenshot, get_screenshot, export) retrieve or output similar layer/document data, so an agent may struggle to pick the right one without careful reading.

Naming Consistency4/5

All tool names use snake_case consistently, with predictable verb_noun or noun forms (list_commands, run_command, get_node, open_file). A few names deviate from the verb_noun pattern (batch, select, pointer, key), but they remain readable and stylistically consistent.

Tool Count3/5

24 tools is on the heavy side for an MCP server and approaches the 25+ threshold where tool sets become unwieldy. The app's broad scope (561 commands, design editing, inspection, export, Figma-compatible getters) partially justifies the count, but some tools could likely be consolidated.

Completeness4/5

The surface covers core design automation: creating nodes, setting properties, inspecting documents/layers, selecting, exporting, screenshots, file open/save, undo/redo, and low-level input. Deletion, closing files, and other lifecycle operations are not explicit, though run_command and batch can likely reach them, leaving minor gaps.

Maintenance

ActivityMaintained
ResponsivenessNo issues