Read Database Columns
read_database_columnsRetrieve column metadata, select options, and view mappings from AFFiNE database blocks. Inspect database schema before adding rows.
Instructions
Read schema metadata for an AFFiNE database block, including columns, select options, and view column mappings. Useful for empty databases before any rows exist.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"docId": "<docId>",
"databaseBlockId": "<databaseBlockId>"
},
"name": "read_database_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document ID containing the database | |
| workspaceId | No | Workspace ID (optional if default set) | |
| databaseBlockId | Yes | Block ID of the affine:database block |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| views | Yes | ||
| columns | Yes | ||
| rowCount | Yes | ||
| columnCount | Yes | ||
| titleColumnId | Yes | ||
| databaseBlockId | Yes |