collections_add_file
Add a file to a knowledge collection.
The file must be uploaded and indexed first (files_upload + files_ingest). If the file was previously removed, it is re-enabled.
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": {
"collection_id": "<collection_id>",
"file_id": "<file_id>"
},
"name": "collections_add_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ID of the file to add (from files_upload) | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. | |
| collection_id | Yes | ID of the collection |