Update Collection Rules
update_collection_rulesUpdate a collection's rules to rebuild its allow-list and control which documents appear.
Instructions
Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
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": {
"collectionId": "<collectionId>",
"rules": "<rules>"
},
"name": "update_collection_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | Rule set used to rebuild the collection allow-list. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. | |
| collectionId | Yes | AFFiNE collection id from list_collections or create_collection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | ||
| allowList | Yes | ||
| workspaceId | Yes | ||
| collectionId | Yes | ||
| matchedCount | Yes | ||
| matchedDocIds | Yes |