Skip to main content
Glama

Append Block

append_block

Append blocks like headings, lists, tables, and embeds to AFFiNE documents with precise placement control and type validation.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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).
urlNoURL for bookmark/embeds
htmlNoRaw html for embed_html
nameNoAttachment file name
rowsNoTable row count
sizeNoAttachment/image file size in bytes
textNoBlock content text
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.
docIdYesAFFiNE document id.
embedNoAttachment embed mode
latexNoLatex expression
levelNoHeading level for type=heading
styleNoList style for type=list
widthNoWidth for frame/edgeless_text/note.
designNoDesign payload for embed_html
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.
pageIdNoTarget page/doc id for linked/synced doc embeds
strictNoStrict validation mode (default true)
captionNoCode caption when type is code
checkedNoTodo state when type is todo
columnsNoTable column count
paddingNoDefault padding (px) for `childElementIds` auto-sizing on frames (each side, plus +30px title band) and fallback gap for `stackAfter` (default 40).
languageNoCode language when type is code
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.
mimeTypeNoAttachment mime type
sourceIdNoBlob source id for image/attachment
viewModeNoInitial data view preset for type=database or type=data_view. Defaults: database=table, data_view=kanban
iframeUrlNoOverride iframe src for embed_iframe
placementNoOptional insertion target/position
referenceNoTarget id for surface_ref
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'}`.
refFlavourNoTarget flavour for surface_ref (e.g. affine:frame)
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.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.
bookmarkStyleNoBookmark card style
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.
Behavior3/5

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

Annotations indicate mutation (readOnlyHint=false) but description does not elaborate on side effects, idempotency, or destructive potential. The mention of 'strict validation' adds minor behavioral context, but overall the description adds little beyond what annotations already 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?

Single sentence, front-loaded with key information, no wasted words. Perfectly concise for the high-level purpose.

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 complexity (37 params, nested objects, no output schema), the description is too brief. It does not explain the variety of block types or placement options, relying heavily on the schema. Could be more complete to aid agent understanding.

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 100% with detailed parameter descriptions. The tool description adds no new parameter meaning beyond referencing 'placement' and 'strict', which are already documented in the schema. Baseline 3 is appropriate.

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 action (append), the resource (document blocks), and key features (canonical types, legacy aliases, placement, strict validation). It differentiates from sibling tools like append_markdown or delete_block.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., append_markdown, update_edgeless_block). Does not mention prerequisites, exclusions, or comparison to siblings.

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