kb_add_file
Creates a knowledge base document from a file already uploaded via a signed ID, extracting, chunking, and embedding its text in the background so you can track progress and retry failures.
Instructions
Step 2 of a two-step file upload: create the KB document from a file already PUT to the
upload_url from kb_create_direct_upload (signed_id). The file's full text is extracted, chunked
and embedded in the background. Returns {document_id, status}; kb_get_status reports progress.
A file that can't be read, or holds more text than one document can (about 5 million
characters), ends as status 'failed' with error saying why; it keeps its document_id, and
kb_retry_document re-runs it in place.
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": {
"project_id": "<project_id>",
"collection_id": "<collection_id>",
"signed_id": "<signed_id>",
"name": "<name>"
},
"name": "kb_add_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| metadata | No | ||
| signed_id | Yes | ||
| project_id | Yes | ||
| collection_id | Yes | ||
| document_type | No |