Upload Files
upload_assetCreates an Asset Hub asset from local files by returning per-file upload links to PUT bytes to, then finishing the upload. Use it when a user asks to upload files to Meshive.
Instructions
Start uploading files from the user's computer as a new Asset Hub asset, when the user asks to upload them. This server can't read local files: it returns an upload link per file, you PUT each file's exact bytes to its link from your own shell, then call finish_upload.
files = [{"path": name inside the asset (a file name, or a/b.txt for a folder), "size_bytes": exact size, "sha256": optional}]. One call makes one asset; name defaults from the files and asset_type (dataset, model, adapter, checkpoint, config, file) is guessed when omitted.
Upload each with curl -fsS -T <local file> "<url>" (on Windows curl.exe, not PowerShell's curl alias). The links expire after presign_expires_in seconds and let anyone who has them upload into this asset: use them only in that command, never in files or other tools. Files over 200 MiB need the CLI instead (meshive asset-upload <path>, which uploads in parts); this tool then cancels and says so.
Managed storage is billed per GiB-month (see the assets tool); accounts with no payment yet have a storage limit.
The server keeps no operation record of this call, so operation_status can't look it up and a repeated call runs again.
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": {
"files": "<files>"
},
"name": "upload_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| files | Yes | ||
| workspace | No | ||
| asset_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||