Skip to main content
Glama

set_layout_grids

Define responsive column or row scaffolding on a frame, replacing existing grids. Accepts column count, gutter size, alignment, or uniform square grid patterns.

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
Behavior4/5

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

Annotations already indicate the tool is not read-only (readOnlyHint=false) and not destructive (destructiveHint=false). The description adds behavioral details: it replaces existing grids with the provided array, can clear grids with [], and returns a simple response. This context is valuable 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 concise (3-4 sentences) and front-loaded: the first sentence states the primary purpose. It efficiently covers grid types, replacement behavior, constraints, and return value without extraneous information.

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?

The description covers the tool's purpose, grid types, usage constraints (frames only), and return format. While it omits potential error cases or permissions, the schema and annotations provide sufficient context for correct invocation. A complete and well-rounded definition.

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%, with descriptions for each parameter. The description adds meaning by explaining grid patterns (COLUMNS/ROWS/GRID) and their behavior, such as GRID using sectionSize for uniform squares. It also gives concrete examples like 'a 12-col grid,' enhancing understanding beyond the schema.

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 it sets a frame's own layout grids with the verb 'Set' and the resource 'layout grids'. It explicitly distinguishes itself from set_auto_layout, which arranges children, making the tool's purpose unambiguous among siblings.

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?

The description provides clear context on when to use the tool, contrasting it with set_auto_layout. It also specifies that only frames, components, and instances carry layout grids, guiding the agent on valid nodes. However, it could mention other potentially related tools like set_layout_props for completeness.

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