Skip to main content
Glama
Figma Vector MCP

Figma Vector MCP

by workingmodel

set_gradient_fill

Apply linear, radial, angular, or diamond gradient fills to Figma nodes, replacing existing fills and using at least two sorted color stops.

Instructions

Apply a gradient fill to a Figma node. Supports LINEAR, RADIAL, ANGULAR (conic), and DIAMOND types. Replaces any existing fills. Stops must be sorted by position (0 → 1).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeId": "<nodeId>",
      "stops": "<stops>"
    },
    "name": "set_gradient_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoGradient typeLINEAR
angleNoRotation in degrees — 0 = top→bottom, 90 = left→right (LINEAR and ANGULAR)
stopsYesAt least 2 colour stops, sorted by position 0→1
centerNoFocal point [cx, cy] in 0–1 node-relative coordinates (RADIAL and DIAMOND, default [0.5, 0.5])
nodeIdYesFigma node ID
gradientTransformNoRaw 2×3 affine gradientTransform matrix — overrides angle/center when provided

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It does usefully disclose the destructive trait 'Replaces any existing fills' and the stop-ordering constraint, but says nothing about permissions, failure modes, or what is returned after the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action and the destructive replacement note. The final sentence largely duplicates the stops field description in the schema, which is minor waste but not harmful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation with no annotations and no output schema, the description covers the type set, replacement semantics, and ordering invariant. It leaves open the return value and any per-type parameter interaction (angle only affecting LINEAR/ANGULAR, center only RADIAL/DIAMOND), which an agent would need when calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so nodeId, stops, angle, center, and gradientTransform are already documented, including the angle convention and the matrix override note. The description's only added hint is the 'sorted 0 → 1' ordering, which restates the stops schema field and does not explain angle-versus-center applicability per gradient type.

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?

States a specific verb (apply) and resource (gradient fill on a Figma node), plus enumerates the four supported gradient types. It does not differentiate itself from close siblings like set_fill_color or set_image_fill, so an agent must infer the boundary from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description never says when to pick this over set_fill_color or set_image_fill, and gives no preconditions such as the node type or existing-fill state. Usage is only implied by the tool name and the listed gradient types.

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