Skip to main content
Glama

render_layout

Generate a screen layout using nested rows and columns and save it with a profile and label. It returns warnings to fix overflow or truncated text.

Instructions

Lay out a screen from nested rows and columns (no pixel coordinates) and store it as (profile, label).

root fills the whole display. Containers split space between children; text can fit itself. Always check warnings in the result: it reports truncated text, overflow and elements that got no room, so you can fix the layout and render again (same label overwrites).

Nodes (every node accepts w, h in px and flex as a share of leftover space): {"type":"column"|"row","children":[...],"gap":4,"padding":6,"align":"stretch|start|center|end", "justify":"start|center|end|space-between","fill":colour,"border":px,"border_color":colour} padding is a number, [vertical, horizontal] or [top, right, bottom, left]. align = cross axis (default stretch); justify = main axis when no child has flex. {"type":"text","text":"..","size":12|"fit","bold":false,"color":"black","align":"left|center|right", "valign":"top|middle|bottom","max_lines":1,"min_size":8,"max_size":96,"fit":"shrink"} size "fit" (or fit "shrink") picks the largest size that fits the box: give it flex or w/h. Text longer than its box is cut with an ellipsis (and warned): raise max_lines to wrap. {"type":"rect","fill":colour,"outline":colour} (a bar or rule: {"type":"rect","h":2,"fill":"black"}) {"type":"progress","value":0.0-1.0,"h":8} {"type":"spacer"} (give it flex or w/h) Colours: black, white, red, yellow, gray, dark_gray, light_gray or #rrggbb (snapped to the profile). Limits: 8 levels deep, 120 nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYes
labelYes
profileYes
backgroundNowhite
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it delivers: overwrite-by-label semantics, truncation/overflow/no-room warning behavior, hard limits (8 levels, 120 nodes), and colour snapping to the profile. It omits any auth/permission notes and doesn't say what the full return payload is beyond `warnings`.

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?

Purpose and the critical warning-feedback loop are front-loaded, then the node vocabulary is laid out in a scan-friendly list with no filler. Given the complexity, the length is justified, though a few lines pack several rules together.

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?

For a deeply nested, 0%-schema-coverage tool with no output schema, the description supplies nearly everything an agent needs to build a valid tree: node types, accepted keys, defaults, limits and colours. Remaining gaps are the undocumented non-root parameters and what the stored render returns besides warnings.

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 coverage is 0% and `root` is only "object, additionalProperties true", so the description's node grammar is doing essential work that the schema cannot. However, the other four parameters (`profile`, `label`, `background`, `description`) get no explanation — `background` and `description` are never mentioned at all, and valid `profile` values are left to the list_profiles sibling.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Lay out a screen from nested rows and columns") plus the storage model ("store it as (profile, label)") and explicitly excludes pixel coordinates. It does not, however, name or contrast itself with the sibling render_card, so an agent must infer the screen-vs-card distinction.

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?

Gives a genuine workflow hint — check `warnings`, fix the layout, render again, and that "same label overwrites" — which is real usage context. But it never states when to pick this tool over render_card, nor any prerequisites or when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.