Add Doc To Collection
add_doc_to_collectionAdd an existing document to an AFFiNE collection allow-list by providing its document ID and collection ID.
Instructions
Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
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>",
"docId": "<docId>"
},
"name": "add_doc_to_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | AFFiNE document id. | |
| 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 |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| rules | Yes | ||
| allowList | Yes |