Skip to main content
Glama

set_widget_slot_properties

DestructiveIdempotent

Set anchors, offsets, position, size, z_order, or auto_size on a widget's CanvasPanelSlot in a Widget Blueprint, then compile, save, and read back the slot.

Instructions

Set the CanvasPanelSlot layout of a widget inside a CanvasPanel of a Widget Blueprint asset -- anchors, offsets, position, size, z_order and auto_size, only those passed -- then compile and save the blueprint; the reply reads the whole slot back. position and size write the same fields as offsets (Left/Top and Right/Bottom) and are applied after it, so they win when both are given. A widget not under a CanvasPanel, or a call with none of the six fields, is an error. Refused while PIE runs unless force=true. For other slot types use set_box_slot_properties, set_grid_slot_properties or set_slot_properties.

Returns: { widget_bp_path: string, widget_name: string, anchors_set: bool, offsets_set: bool, position_set: bool, size_set: bool, z_order_set: bool, auto_size_set: bool, current_anchors: [float], current_offsets: [float], current_position: [float], current_size: [float], current_z_order: int, current_auto_size: bool, saved: bool, save_error: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoOptional [X, Y] size.
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
anchorsNoOptional [MinX, MinY, MaxX, MaxY] anchor floats.
offsetsNoOptional [Left, Top, Right, Bottom] offset floats.
z_orderNoOptional int draw/hit-test order (higher draws on top); use with reorder_widget_child's note for CanvasPanel stacking.
positionNoOptional [X, Y] position.
auto_sizeNoOptional bool: when true, the slot sizes itself to the widget's desired size instead of `size`.
widget_nameYesname of the widget whose canvas slot to edit
blueprint_nameNoAlias of `widget_bp_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `widget_bp_path`.
widget_bp_pathNo/Game path of the Widget Blueprint asset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds concrete behavior: it compiles and saves the blueprint, reads the whole slot back, only applies passed fields, and errors on invalid targets. The PIE refusal rationale also appears in the force param description, so some content is duplicated rather than net-new, keeping this just short of 5.

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?

Front-loaded with purpose and scope, then behavior, then alternatives, then return shape. It is on the verbose side and the Returns block is long, but with no output schema that block earns its place. Nearly every clause carries unique information.

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 10-parameter mutation tool with no output schema, the description covers the mutation scope, the compile/save side effect, error conditions, PIE gating with force escape, sibling routing, and a full return-shape enumeration including saved/save_error. Nothing an agent needs to call it correctly is missing.

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 the baseline is 3, but the description genuinely adds semantics the schema does not: position/size write the same underlying fields as offsets (Left/Top and Right/Bottom) and win when both are supplied, and only the fields passed are touched. That precedence rule is exactly the kind of meaning a schema cannot express.

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?

States a specific verb (Set) plus resource (CanvasPanelSlot layout of a widget inside a CanvasPanel of a Widget Blueprint) and enumerates the six writable fields plus the compile-and-save side effect. It explicitly names the sibling tools for other slot types (set_box_slot_properties, set_grid_slot_properties, set_slot_properties), so an agent can disambiguate without opening a schema.

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?

Gives explicit when-to-use conditions and when-not: names the correct alternative per slot type, states that a non-CanvasPanel widget or a call with none of the six fields is an error, and states the PIE refusal with the force=true escape hatch. Also flags precendence (position/size applied after offsets). Nothing is left to inference.

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

Deploy Server

Other Tools