Skip to main content
Glama

set_layout

Set auto-layout properties on a container: control spacing, padding, direction, alignment, or grid layout for its children.

Instructions

Set auto-layout properties on a container.

set_layout({node: "1:2", gap: 16, p: 24}) set_layout({node: "1:2", layout: "row", justify: "space-between"}) set_layout({node: "1:2", layout: "column", gap: 8, p: "16 24", align: "center"}) set_layout({node: "1:2", layout: "grid", cols: 3, rows: 2, gap: 16})

// Batch — bulk update in one call: set_layout({nodes: [{node: "1:2", gap: 16, p: 24}, {node: "1:3", gap: 8, p: 12}]})

Controls spacing, padding, direction, and alignment of a container's children. Grid: use layout:"grid" with cols/rows + gap (or rowGap/colGap for asymmetric). Children fill the grid in insertion order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeNoNode ID (single mode)
layoutNoAuto-layout mode
gapNoSpacing between children (px). On grid sets both row+column gap.
rowGapNoGrid row gap (px, grid only)
colGapNoGrid column gap (px, grid only)
colsNoGrid column count (required when layout="grid")
rowsNoGrid row count (required when layout="grid")
pNoPadding — number, "v h", or "t r b l"
justifyNoMain axis (flex only)
alignNoCross axis (flex only)
wrapNoWrap behaviour (flex only)
nodesNoBatch: [{node, layout?, gap?, p?, ...}]
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not disclose whether the operation is destructive (overwrites existing settings), what permissions are needed, or any side effects. Partial information is given for grid mode (children fill in insertion order), but overall insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately sized and front-loaded with examples followed by a clear summary. It is not overly verbose, though some examples could be trimmed without losing meaning.

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

Completeness3/5

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

Given the complexity (12 parameters, no output schema), the description covers main use cases with examples and grid-specific details. However, it lacks information on return values, error handling, or default behaviors, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds examples that illustrate parameter combinations but does not provide additional semantic meaning beyond what the schema already provides.

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 auto-layout properties on a container and lists the controlled aspects (spacing, padding, direction, alignment). It distinguishes itself from sibling set_* tools by focusing on container layout.

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

Usage Guidelines3/5

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

The description provides examples for different layout modes and batch usage, but does not explicitly state when to use this tool versus alternatives or when not to use it. Usage context is implied but not clearly defined.

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/musepy/genable'

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