Skip to main content
Glama

Compose and print a page

layout_page

Place images, text and shapes on a page in millimetres, centre them, repeat them in a grid, then preview before printing. Adjust the layout until the preview looks right, then send it to the printer.

Instructions

Place images, text and shapes on a page in millimetres (centred, side by side, repeated in a grid such as 2 x 4 ID cards, edge to edge), then preview it and/or print it. Images should be cleaned with image_edit first. Default: returns a preview and prints nothing; call again with print:true when it looks right. Items: image {source,x_mm,y_mm,width_mm,height_mm,fit,align,center_x,center_y,rotate_deg,opacity,border_mm,radius_mm}, text {text,x_mm,y_mm,width_mm,font_size_pt,font,color,bold,italic,underline,align,line_height,rotate_deg}, shape {shape:rect|ellipse|line,x_mm,y_mm,width_mm,height_mm,fill,stroke,stroke_mm,radius_mm}, copies {of:,rows,cols,gap_mm}.

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": {
      "items": "<items>"
    },
    "name": "layout_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNo
itemsYesDrawn in order, later items on top. Coordinates are mm from the top-left of the page (or of the margin box)
paperNoA4 (default), A5, A6, letter, legal, 4x6, 5x7, photo-l, or "WxHmm"
printNoSend to the printer. Default false
copiesNoNumber of sheets
duplexNo
dry_runNoWith print: validate and report the plan, move no paper
previewNoReturn page images. Default true when print is false
printerNoName, id, IP or alias. Omit: the server picks
qualityNo
save_asNoAlso keep the rendered page as a .png or .pdf file at this path (never overwrites)
margin_mmNoInset the design by this margin; turns borderless off
backgroundNoCSS colour, default white
borderlessNoDefault true: print exactly as laid out, edge to edge where the printer supports it
orientationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare openWorldHint, non-idempotent, non-destructive, but they do not disclose the critical default that nothing is printed unless print:true is set — the description supplies that, plus the image_edit prerequisite and edge-to-edge capability. It stops short of describing what the preview actually returns (image count, resolution) and how failures on a physical printer surface.

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

Conciseness3/5

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

The first sentence is front-loaded and earns its place, but it runs long with stacked parentheticals, and the trailing field enumeration is a dense unstructured dump that is hard to scan and partly duplicates the schema. Nothing is grossly wasteful, but formatting into short lines or referring to the schema would read better.

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 15-parameter composition tool with no output schema, the description covers the purpose, the default non-printing behavior, the preview workflow, and the prerequisite cleanup step. The main residual gap is that preview’s return value is only gestured at ('returns a preview'), which the absent output schema would otherwise require explaining.

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 73%, so most semantics live in the schema already. The description's inline field lists for image/text/shape/copies roughly restate the schema's property names (and even omit some, e.g. border_color, opacity on text) without adding format, defaults, or interaction rules; the 14 top-level parameters such as paper, duplex, dry_run, save_as and printer get no mention at all.

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 opening sentence names a specific verb (place) and resource (images, text, shapes on a page), plus the unit of measure and the canvas model, then adds the terminal actions (preview and/or print). It is clearly distinguished from siblings image_edit (a prerequisite) and the standalone print/preview tools by making composition the primary act.

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?

It gives concrete workflow guidance: clean images with image_edit first, and a two-step preview-then-print pattern ('call again with print:true when it looks right'). What is missing is an explicit statement of when to use this versus the sibling print or preview tools when the page is already composed.

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