kb_create_direct_upload
Generates a presigned URL for uploading a knowledge base file; send the file via HTTP PUT, then call kb_add_file with the signed_id to create the document.
Instructions
Step 1 of a two-step file upload: get a presigned URL to upload a file into a KB. Returns {signed_id, upload_url, content_type}. The file bytes go to upload_url as an HTTP PUT with the returned content_type as the Content-Type header; kb_add_file(signed_id) then creates the document. Needs outbound network access to the storage URL; in a chat whose code sandbox has none (claude.ai, Claude Desktop), create_upload_link gives the user a browser page for the same upload. Allowed: PDF, DOCX, PPTX, XLSX, XLS, CSV, TXT, MD, HTML, HTM (max 256 MB). Other types are refused.
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>",
"filename": "<filename>"
},
"name": "kb_create_direct_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| byte_size | No | ||
| project_id | Yes | ||
| content_type | No |