index_document
Add UTF-8 text to the RAG index. kind=file stores a named text file and checks ACL file_upload (former file_upload). kind=note stores a short note titled title or note.txt and checks ACL rag_note (former rag_note). Both preflight rag_index capacity, then meter 1 kvp_ops for the upload. Chunk indexing spends rag_index later on the queue. Returns file, an estimated chunk count, budget, and keyBudget. PDF and Excel binaries belong on REST multipart POST /api/files/:namespace. Use search_documents to query and list_files to list what was uploaded. No email.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | file checks ACL file_upload and requires filename. note checks ACL rag_note and uses title as the filename. Required. No default. | |
| text | No | UTF-8 document body. Required for file and note. | |
| title | No | Filename for kind=note, up to 180 characters. Default note.txt. Ignored for kind=file. | |
| filename | No | File name including extension. Required for kind=file. Ignored for kind=note (use title). | |
| namespace | No | Namespace that will own the file. Required for file and note. Must be in the key namespace allow-list when that list is set. | |
| contentType | No | MIME type for kind=file. Default text/plain. Ignored for kind=note, which is stored as text/plain. |