Skip to main content
Glama

set_strokes

Apply solid or gradient strokes to a Figma node, with control over stroke weight, alignment, dash pattern, and per-side thickness. Returns success status and node ID.

Instructions

Set a node's strokes (SOLID or gradient paints, same shape as set_fills) plus optional strokeWeight, strokeAlign (INSIDE / OUTSIDE / CENTER), dashPattern (dashes), and per-side weights (strokeTopWeight / strokeRightWeight / strokeBottomWeight / strokeLeftWeight — for nodes that support individual stroke weights, e.g. a border-bottom-only divider). A per-side weight overrides strokeWeight for that side. Any field may be omitted to leave it unchanged. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesFigma node id
strokesYesStroke paints
dashPatternNoDash/gap lengths in px, e.g. [4, 2]; [] for a solid stroke
strokeAlignNoStroke position relative to the geometry
strokeWeightNoUniform stroke thickness in px
strokeTopWeightNoTop side weight in px
strokeLeftWeightNoLeft side weight in px
strokeRightWeightNoRight side weight in px
strokeBottomWeightNoBottom side weight in px
Behavior4/5

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

Beyond the minimal annotations (readOnlyHint=false, destructiveHint=false), the description discloses that omitted fields are left unchanged, per-side weights override strokeWeight, and the return shape is { ok, nodeId }. It also hints at node-specific support for per-side weights. This provides meaningful behavioral context without contradicting the annotations.

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?

The description is dense but efficient, with each sentence contributing essential information. It front-loads the main action, then lists optional parameters, gives an override rule, states omission semantics, and ends with the return value. The reference to set_fills avoids repeating paint structure details, keeping it concise.

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

Completeness4/5

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

With 9 parameters, no output schema, and minimal annotations, the description covers the key aspects: available parameters, override behavior, omission semantics, and return value. It does not mention failure cases (e.g., node not supporting strokes) or how to specify gradients beyond referencing set_fills, but it is sufficiently complete for a complex tool.

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?

The schema already covers all 9 parameters with descriptions, giving a baseline of 3. The description adds value by explaining relationships: per-side weight overrides strokeWeight, dashPattern is dashes, and the strokes array has the 'same shape as set_fills'. This goes beyond what the schema states, clarifying how parameters interact.

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 the tool sets a node's strokes (SOLID or gradient paints) plus optional stroke properties, which is a specific verb+resource. It explicitly references set_fills as a sibling to distinguish strokes from fills, and lists the exact optional properties (strokeWeight, strokeAlign, dashPattern, per-side weights). This fully differentiates it from sibling tools like set_fills or set_effects.

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 implies when to use this tool by referencing set_fills (use set_fills for fills, set_strokes for strokes) and provides clear context for optional parameters. It notes per-side weights are 'for nodes that support individual stroke weights' and gives an example (border-bottom-only divider), which is useful guidance. However, it does not explicitly state when not to use it or compare to other stroke-related tools beyond set_fills.

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/awdr74100/figwright'

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