Skip to main content
Glama

set_constraint

Define and apply horizontal and vertical layout constraints (left, right, top, bottom, center, scale, stretch) to Figma nodes. Supports batch operations, child nodes, and aspect ratio preservation for precise design control.

Instructions

Set constraints (left/right/top/bottom/center/scale/stretch) for one or more Figma nodes.

Returns: Array of result objects for each operation.

Input Schema

NameRequiredDescriptionDefault
applyToChildrenNoIf true, apply constraints to all children of the node(s).
constraintNoA single constraint entry to apply.
constraintsNoAn array of constraint entries to apply in batch.
maintainAspectRatioNoIf true, maintain the aspect ratio when applying constraints.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "applyToChildren": { "description": "If true, apply constraints to all children of the node(s).", "type": "boolean" }, "constraint": { "additionalProperties": false, "description": "A single constraint entry to apply.", "properties": { "horizontal": { "description": "The horizontal constraint to apply.", "enum": [ "left", "right", "center", "scale", "stretch" ], "type": "string" }, "nodeId": { "description": "The ID of the node to apply constraints to.", "type": "string" }, "vertical": { "description": "The vertical constraint to apply.", "enum": [ "top", "bottom", "center", "scale", "stretch" ], "type": "string" } }, "required": [ "nodeId", "horizontal", "vertical" ], "type": "object" }, "constraints": { "description": "An array of constraint entries to apply in batch.", "items": { "$ref": "#/properties/constraint" }, "type": "array" }, "maintainAspectRatio": { "description": "If true, maintain the aspect ratio when applying constraints.", "type": "boolean" } }, "type": "object" }

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/amalinakurniasari/conduit'

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