align_to_grid
Snap Figma nodes' parent-relative x/y positions to a fixed grid, and optionally round width and height to grid units, returning before/after values per node to verify alignment changes.
Instructions
Snap nodes' x/y (relative to their parent) to a grid of gridSize px; with snapSize also round width/height to the grid. Returns before/after per node.
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>",
"gridSize": "<gridSize>"
},
"name": "align_to_grid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| nodeIds | Yes | ||
| gridSize | Yes | ||
| snapSize | No | Also snap width/height (min one grid unit) |