set_constraints
Set horizontal and vertical resize constraints on Figma nodes to control responsive resizing; choose MIN, MAX, CENTER, STRETCH, or SCALE per axis, and unspecified axes stay unchanged.
Instructions
Set resize constraints on nodes. Pass horizontal and/or vertical (MIN|MAX|CENTER|STRETCH|SCALE); the unspecified axis is kept. Auto-layout children that aren't absolutely positioned return an error. Returns previous and new values.
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_constraints"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| nodeIds | Yes | ||
| vertical | No | ||
| horizontal | No |