register_project_file
Records a file in a project for later download from an uploaded S3 key or a public HTTPS URL, storing the original bytes and returning a stable file ID.
Instructions
Record a file in a project, kept byte for byte so it can be downloaded: either one already uploaded (s3_key) or one at a public https link (url). Exactly one of the two.
s3_key: step 2 of the upload, for a file already POSTed to the `uploadUrl` from
upload_file_to_project (a 201); `name` is required with it, a human-readable name (e.g. "Client X
audit deck template").
url: Unilytics downloads the file from the link (PPTX, PPT, XLSX, XLS, DOCX, DOC, PDF, CSV, MD,
TXT, JSON, PNG, JPG, JPEG, GIF, SVG or WEBP, up to 100 MB, redirects followed, public https
addresses only) and stores the original. The type comes from the response (its name, its
Content-Type and the file's own bytes), never from the link alone: a web page, a login page or a
file of another type is refused. content_type and byte_size come from the file and aren't taken
with url; `name` defaults to the file's own name. request_id (a UUID, optional) makes the call
repeatable: a repeat with the same request_id and arguments within 24 hours returns the first
call's file (free) instead of storing it again, and a request_id used for different arguments is
refused. Without it, each call stores a new copy. The result's `file` holds the stored name,
file_type and bytes.
Returns {file_id, name}; the file_id is stable and get_project_file takes it.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>"
},
"name": "register_project_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| name | No | ||
| s3_key | No | ||
| byte_size | No | ||
| project_id | Yes | ||
| request_id | No | ||
| content_type | No |