Skip to main content
Glama

Delete variables

figma_delete_variable
DestructiveIdempotent

Delete Figma variables (design tokens) by ID; bound nodes keep their last resolved value. Get IDs with figma_get_variable_defs, then remove one or many tokens.

Instructions

Delete variables (design tokens) by id. Nodes bound to one keep its last resolved value. figma_get_variable_defs lists ids. Returns per-item results: items: [{ id, ok, error? }] — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
variableIdsYese.g. ["VariableID:1:2"].
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Adds real behavior beyond the annotations: bound nodes retain their last resolved value, results are per-item with a partial-failure contract ('one node failing does not fail the call'), and editor support is qualified. Annotations only flag destructive/idempotent; the description explains the actual blast radius and failure semantics.

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?

Five short sentences, front-loaded with purpose, then side effects, id sourcing, return contract, and environment scope. Each sentence carries distinct information with no repetition of the name or annotations.

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 supplies the return shape (`items: [{ id, ok, error? }]`) and partial-failure behavior, plus the critical side effect on bound nodes. Nothing an agent needs to call this destructive tool safely 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, but the description still adds value: it establishes that deletion is keyed by id and names the tool that produces those ids, tying variableIds to a concrete source. The idempotencyKey's retry semantics are left to the schema, which already documents them thoroughly.

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?

States a specific verb and resource ('Delete variables (design tokens) by id'), and the parenthetical disambiguates variables from other deletable Figma objects such as styles or variable collections. An agent can tell it apart from siblings like figma_delete_variable_collection without opening a schema.

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?

Gives clear operational context by pointing at figma_get_variable_defs as the way to obtain valid ids, and states the editor scope where the call is supported. It stops short of explicit when-not guidance (e.g., collections belong to figma_delete_variable_collection), so it is not a full 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