Skip to main content
Glama

Update Frame Children

update_frame_children

Replace all contents of a frame block with a new set of elements (shapes, notes, groups). Automatically resizes frame to fit new contents; can disable resizing for ownership-only edits.

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

TableJSON 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.
Behavior5/5

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

Annotations show it's mutating but not destructive. The description adds rich behavioral context: missing ids returned under 'missing', ownership mapping matching editor behavior, resize logic, and skips when empty. This goes well beyond the annotations.

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?

The description is efficiently packed with essential details, front-loaded with the main action, and every sentence adds value. No redundancy or fluff.

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?

Given the tool's complexity, the description covers the core behaviors and edge cases. It lacks a full return structure specification, but does mention 'missing' ids. The parameter and behavior details are sufficient for correct invocation.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning to each parameter: childElementIds is a full replacement list, resizeToFit controls recomputation, padding is ignored when false, blockId is flavour-bound, and the empty array case. It also hints at return value (missing ids).

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 the verb 'Replace' and specific resource 'frame block's contents wholesale'. It distinguishes from siblings by specifying it handles both surface elements and edgeless blocks together, which is unique among the listed tools.

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?

The description explains the core usage (wholesale replacement), the effect of resizeToFit, and that passing `[]` clears ownership with skipped resize. It implies when to use this tool (for full replacement) versus potentially other tools (none for partial updates), but does not explicitly state when not to use it.

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/DAWNCR0W/affine-mcp-server'

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