Skip to main content
Glama

Update Frame Children

update_frame_children

Replace a frame block's entire child set with specified surface elements or edgeless blocks, optionally resizing the frame to fit its new contents and returning unresolved IDs.

Instructions

Replace a frame block's contents wholesale. Accepts ids of surface elements (shapes/connectors/groups) AND edgeless blocks (notes/frames/edgeless-text) — all go into BlockSuite's prop:childElementIds map, matching what the editor writes when you drag members into a frame. Dragging the frame drags every owned member. Ids that don't resolve come back under 'missing'. By default the frame is resized to fit its new contents (plus padding + title band); set resizeToFit=false to leave xywh untouched. Pass [] to clear ownership (resize is skipped in that case).

Input Schema

NameRequiredDescriptionDefault
docIdYesDocument ID
blockIdYesFrame block id (flavour affine:frame).
paddingNoPadding (px) used when resizeToFit is true (default 40). Ignored when resizeToFit=false.
resizeToFitNoIf true (default), recompute xywh from the union of resolvable child bounds + padding + title band. Set to false to preserve the frame's current box (useful when you want ownership-only edits or manual positioning).
workspaceIdNoWorkspace ID (optional if default set)
childElementIdsYesFull list of ids the frame should own/contain. Replaces any existing ownership.
expectedRevisionNoOptional read_doc revision of this primary document. Reject stale content before writing. Covers document content, not workspace metadata; requires all writers to share one MCP server.

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
xywhNo
errorNo
blockIdNo
detailsNo
flavourNo
missingNo
resizedNo
updatedNo
ownedIdsNo
causeCodeNo
retryableNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses what the write actually does: wholesale replacement of the ownership map, default resize-to-fit including padding and title band, resize being skipped on clear, and unresolved ids surfacing under 'missing'. That is exactly the kind of mutation behavior an agent needs and the annotations alone don't provide.

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?

Six tight sentences, front-loaded with the core mutation and then the important edge cases (missing ids, resize default, clear behavior). No filler or restatement of the name.

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 mutation tool with 7 params, an output schema, and annotations, this covers everything an agent needs: replacement semantics, resize defaults, clearing behavior, and missing-id handling. It correctly leaves return-value structure to the output schema.

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; the description still adds value by explaining which id types are accepted (surface elements and edgeless blocks) and that childElementIds is a full replacement list, plus the interaction between `[]`, resizeToFit, and padding. It doesn't add syntax detail beyond that, which is fine given 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 opens with a precise verb+resource ('Replace a frame block's contents wholesale') and immediately clarifies scope: it owns the frame's childElementIds map, not the child elements themselves. That distinguishes it from sibling mutation tools like update_edgeless_block or update_surface_element without ambiguity.

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 clear conditions: use resizeToFit=false for ownership-only edits or manual positioning, and pass `[]` to clear ownership. What's missing is an explicit pointer to an alternative tool when the caller wants to add/remove a single child rather than wholesale replacement, so it stops short of naming alternatives.

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