Skip to main content
Glama

set_stroke

Set stroke color, weight, alignment, and dash patterns on Figma nodes, including per-side border weights; pass color 'none' to remove strokes and update only specified options.

Instructions

Set stroke color / weight / alignment / dashes on nodes. color 'none' removes strokes. sides sets per-side weights (frames, components, instances, rectangles), e.g. {bottom: 1, top: 0, left: 0, right: 0} for a bottom border. Only the options you pass are changed. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

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": {
      "nodeIds": "<nodeIds>"
    },
    "name": "set_stroke"
  }
}

Input Schema

NameRequiredDescriptionDefault
capNostrokeCap (lines/vectors)
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
joinNo
alignNo
colorNoHex #RRGGBB / #RRGGBBAA, or 'none' to remove strokes
sidesNoPer-side stroke weights
weightNo
nodeIdsYesFigma node ids, e.g. ['12:34']
dashPatternNoe.g. [4, 4] for dashed; [] for solid

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses non-destructive partial updates, the per-node result shape, and that a single failing node doesn't abort the batch. It omits whether existing stroke properties are overwritten destructively or how permission/file-resolution failures surface.

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?

Four tight sentences, each carrying distinct information: capability, special values, per-side applicability with example, update scope, and return contract. Nothing redundant or buried.

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?

For a 9-parameter mutation tool with no output schema, the description adequately covers return shape and batch-failure behavior, which is what an agent most needs. Minor gaps remain around destructive overwrite of prior stroke values and the default file target, the latter being covered in the schema.

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 67%, and the description adds meaning the schema lacks — notably that `sides` only applies to frames, components, instances and rectangles, with a concrete bottom-border example. Color 'none' and dash removal are partly restated from the schema rather than extended.

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?

Opens with a specific verb and resource plus the exact property set (color / weight / alignment / dashes), which lets an agent separate it from sibling setters like set_effects or set_gradient without opening the 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 operating context: partial-update semantics ('Only the options you pass are changed'), the 'none' removal case, and the node types that support per-side weights. It doesn't name any alternative tool or state when to prefer another setter, so it stops short of explicit routing guidance.

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