Skip to main content
Glama

Append Block

append_block

Append document blocks using canonical types and legacy aliases, with optional placement and strict validation for precise content structuring.

Instructions

Append document blocks with canonical types and legacy aliases (supports placement + strict validation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdNo
docIdYes
typeYesBlock type. Canonical: paragraph|heading|quote|list|code|divider|callout|latex|table|bookmark|image|attachment|embed_youtube|embed_github|embed_figma|embed_loom|embed_html|embed_linked_doc|embed_synced_doc|embed_iframe|database|data_view|surface_ref|frame|edgeless_text|note. Legacy aliases remain supported.
textNoBlock content text
urlNoURL for bookmark/embeds
pageIdNoTarget page/doc id for linked/synced doc embeds
iframeUrlNoOverride iframe src for embed_iframe
htmlNoRaw html for embed_html
designNoDesign payload for embed_html
referenceNoTarget id for surface_ref
refFlavourNoTarget flavour for surface_ref (e.g. affine:frame)
xNoX position on the edgeless canvas for frame/edgeless_text/note (default 0). Prefer ≥40px between sibling bounds; BlockSuite does not auto-arrange.
yNoY position on the edgeless canvas for frame/edgeless_text/note (default 0).
widthNoWidth for frame/edgeless_text/note.
heightNoHeight for frame/edgeless_text/note. When `markdown` is set and height is omitted, an over-estimate is computed from the content — AFFiNE's render-time ResizeObserver corrects `prop:xywh` to the true DOM-measured height on first browser open.
backgroundNoBackground for frame/note. Frame default 'transparent'. For notes, prefer AFFiNE's adaptive `--affine-note-background-<color>` family — `blue` / `purple` / `yellow` / `green` / `teal` / `red` / `orange` / `magenta` / `grey` / `white` / `black`. For specific per-theme colors, pass a `{light, dark}` hex object like `{light:'#fff', dark:'#252525'}`.
markdownNoWhen type='note', parse this markdown into heading/paragraph/list/code child blocks inside the note (BlockSuite-native: mirrors what happens when you paste markdown into an edgeless note). Takes precedence over 'text' for note children. Ignored for other block types.
childElementIdsNoFor type='frame' only. The frame's contents. Accepts ids of surface elements (shapes/connectors/groups) AND edgeless blocks (notes/frames/edgeless-text) — BlockSuite's prop:childElementIds holds both, matching what the editor writes when you drag a note into a frame. Dragging the frame drags every owned member. Ids that don't resolve come back under 'missing'. When width/height are omitted the frame is sized to the union of resolvable child bounds + padding + a 30px title band.
stackAfterNoLayout helper — position this block relative to one or more existing edgeless blocks. Picks the furthest anchor in `direction` for the stack axis, and centers the new block on the anchor group's union on the orthogonal axis (matches how BlockSuite aligns selection-derived blocks; reduces to inherit-anchor-x when widths match). Caller-provided x/y on the orthogonal axis still wins. Works for frame/note/edgeless_text. Example: `stackAfter: { blockId: [f1, f2, f3], gap: 80 }` stacks below whichever column frame ends lowest, centered across all three. Note heights shift at first render (page-root grows with the title, content notes shrink/grow with their children); give extra gap and fix up with `update_edgeless_block` if the down/right chain drifts.
paddingNoDefault padding (px) for `childElementIds` auto-sizing on frames (each side, plus +30px title band) and fallback gap for `stackAfter` (default 40).
sourceIdNoBlob source id for image/attachment
nameNoAttachment file name
mimeTypeNoAttachment mime type
sizeNoAttachment/image file size in bytes
embedNoAttachment embed mode
rowsNoTable row count
columnsNoTable column count
latexNoLatex expression
levelNoHeading level for type=heading
styleNoList style for type=list
bookmarkStyleNoBookmark card style
viewModeNoInitial data view preset for type=database or type=data_view. Defaults: database=table, data_view=kanban
checkedNoTodo state when type is todo
languageNoCode language when type is code
captionNoCode caption when type is code
strictNoStrict validation mode (default true)
placementNoOptional insertion target/position
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only mentions 'supports placement + strict validation', omitting details on destructive nature, required permissions, or side effects. The description adds minimal value beyond the schema.

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?

The description is a single sentence, efficiently conveying the core purpose. It is front-loaded but might benefit from slight expansion to cover key aspects without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (37 parameters, nested objects) and lack of output schema, the minimal description is insufficient for complete understanding. However, the rich schema compensates partially. Return values, error conditions, and prerequisites are not addressed.

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 description coverage is high (95%), so the schema already documents most parameters. The description adds no additional param-level details. Baseline 3 is appropriate as the schema does the heavy lifting.

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 tool appends document blocks with canonical types and legacy aliases, supporting placement and strict validation. This distinguishes it from siblings like append_markdown or append_semantic_section, which handle different content types.

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?

The description implies usage for structured block appending but does not explicitly specify when to use this tool versus alternatives (e.g., append_markdown for raw markdown). No prerequisites or exclusions are mentioned.

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