Add Database Row
add_database_rowAdd a row to an AFFiNE database block by mapping cell values to column names or IDs. Select options are auto-created by label, and title text is stored on the row paragraph.
Instructions
Add a row to an AFFiNE database block. Provide cell values mapped by column name or column ID. Title column text is stored on the row paragraph block. Select columns auto-create options by label.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cells | Yes | Map of column name (or column ID) to cell value. Rich-text and title values accept strings or delta arrays. For LinkedPage references, use insert: " " with reference.type="LinkedPage" and the target pageId; visible labels are resolved by AFFiNE. For select columns, pass the display label (option auto-created if new). | |
| docId | Yes | Document ID containing the database | |
| linkedDocId | No | Link this row to an existing doc by ID. The row will open the linked doc in center peek when clicked. | |
| workspaceId | No | Workspace ID (optional if default set) | |
| databaseBlockId | Yes | Block ID of the affine:database block | |
| expectedRevision | No | Optional 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
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| added | No | ||
| error | No | ||
| details | No | ||
| causeCode | No | ||
| cellCount | No | ||
| retryable | No | ||
| rowBlockId | No | ||
| linkedDocId | No | ||
| databaseBlockId | No | ||
| recoveryGuidance | No |