Skip to main content
Glama

set_stroke

Set stroke (border) on Figma nodes with customizable color, weight, alignment, and batch support. Supports hex, gradients, and variable tokens.

Instructions

Set stroke (border) on a node.

set_stroke({node: "1:2", stroke: "1 #E0E0E0"}) set_stroke({node: "1:2", stroke: "2 #333 inside"}) set_stroke({node: "1:2", color: "#E0E0E0", weight: 1, align: "inside"}) set_stroke({node: "1:2", color: "linear-gradient(90deg, #8B5CF6 0%, #F97316 100%)", weight: 1.5, align: "inside"})

// Batch — bulk stroke update in one call: set_stroke({nodes: [{node: "1:2", color: "#E0E0E0", weight: 1}, {node: "1:3", color: "#333", weight: 2}]})

Shorthand: "weight color align" (e.g. "1 #E0E0E0 inside"). Hex only in shorthand.

Accepted color formats (for the explicit color field, not the shorthand): hex "#E0E0E0" gradient string CSS-like subset (see set_fill description for full grammar — same rules). Common: "linear-gradient(deg, <#hex> %, ...)", "radial-gradient()". Rejected: "circle at X% Y%", named colors, hsl(). variable token qualified bare name "$Border/Default"

To bind a variable to the stroke color, use the explicit color field — the shorthand parser silently drops bare-name tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeNoNode ID (single mode)
strokeNoShorthand: "1 #E0E0E0 inside" — single-string form. Hex only; for gradient/variable use the explicit color field.
colorNoStroke color — hex, gradient string, or qualified bare-name token
weightNoStroke weight in px
alignNoStroke alignment relative to the frame edge
nodesNoBatch: [{node, color?, weight?, align?, stroke?}]
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses behaviors like shorthand syntax, gradient/variable support, and the fact that the shorthand parser silently drops bare-name tokens. It does not mention mutation effects or permissions, but the level of detail is strong.

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?

The description is well-structured with a clear opening, examples, and syntax breakdown. It is slightly lengthy due to multiple examples, but every sentence adds value and it is front-loaded with the core purpose.

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?

Given the tool's complexity (6 parameters, no output schema), the description covers all parameters, provides extensive examples, and explains edge cases like gradients and variable binding. It is complete for the agent to use 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 description coverage is 100%, baseline 3. The description adds significant value by explaining shorthand format, color format details, and batch structure beyond what the schema provides.

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 clearly states 'Set stroke (border) on a node' and provides multiple examples including batch usage, making the purpose unmistakable. It implicitly distinguishes from sibling tools like set_fill by focusing on stroke-specific properties.

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?

The description offers explicit usage patterns (single, batch, shorthand) and explains accepted color formats. It does not explicitly state when to avoid this tool vs alternatives, but the examples provide clear context for appropriate use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/musepy/genable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server