Add Database Column
add_database_columnAdd a typed column (title, rich-text, select, multi-select, number, checkbox, link, or date) to an existing AFFiNE database block to structure records and capture fields.
Instructions
Add a column to an existing AFFiNE database block. Supports title, rich-text, select, multi-select, number, checkbox, link, and date types. A title addition is rejected when the current database snapshot already has a title column.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Column display name | |
| type | No | Column type | rich-text |
| docId | Yes | Document ID containing the database | |
| width | No | Column width in pixels (default 200) | |
| options | No | Predefined options for select/multi-select columns | |
| 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 | ||
| name | No | ||
| type | No | ||
| added | No | ||
| error | No | ||
| details | No | ||
| columnId | No | ||
| causeCode | No | ||
| retryable | No | ||
| recoveryGuidance | No |