Skip to main content
Glama

set_layout_grids

Configure a frame's layout grids (columns, rows, or uniform squares) to define structure. Replaces existing grids; pass an empty array to clear.

Instructions

Set a frame's own layout grids — the responsive column/row scaffold laid over it (the 12-column grid, the 8pt baseline), distinct from auto-layout (set_auto_layout arranges children). Each grid is COLUMNS / ROWS (count + gutterSize + alignment, e.g. a 12-col grid) or GRID (uniform squares via sectionSize, a baseline). Replaces the frame's grids with the array given; pass [] to clear them. Only frames (and components/instances) carry layout grids. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gridsYesLayout grids to set; [] clears all grids on the frame
nodeIdYesFrame (or component/instance) node id
Behavior5/5

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

Annotations only provide readOnlyHint false and destructiveHint false, so the description carries the burden. It discloses that grids are replaced wholesale, empty array clears them, only certain node types are valid, and the return shape is { ok, nodeId }. This is valuable context beyond 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 three concise sentences: purpose, pattern details, and behavior/return. It is front-loaded with the core action and contains no redundant or filler content.

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

Completeness5/5

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

For a two-parameter tool with an array parameter and no output schema, the description covers valid node types, replacement/clear behavior, return shape, and grid pattern semantics. An agent has enough information to select and invoke the tool correctly.

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 100%, so baseline is 3. The description adds pattern semantics (e.g., '12-col grid', '8pt baseline') and explains how gutterSize/alignment/sectionSize relate to pattern types, going beyond the schema's field descriptions. This extra meaning justifies a 4.

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 'Set a frame's own layout grids' with a specific verb and resource, and explicitly distinguishes from set_auto_layout. It also explains the grid patterns (COLUMNS/ROWS/GRID) with examples, making the tool's purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly contrasts with set_auto_layout ('arranges children') and notes that 'Only frames (and components/instances) carry layout grids', giving clear scoping. The description also explains how to clear grids with [] and that the operation replaces existing grids, providing actionable usage guidance.

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