colab_transfer_upload
Upload files to a Colab runtime with atomic transfer, progress tracking, and automatic resume for failed transfers. Sync mode skips files with identical SHA-256 hashes to avoid redundant uploads.
Instructions
Upload atomically with progress. On failure retain transfer_id/staging_path and resume only on the same fingerprint; otherwise clean staging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sync | No | True skips destinations with the same SHA-256; defaults to true. | |
| session | No | Tracked session name. Null is allowed only when exactly one session exists. | |
| max_files | No | Hard file-count limit for a directory transfer. | |
| overwrite | No | When true, explicitly permit replacement of an existing destination. | |
| chunk_size | No | Transfer chunk size in bytes; 1-2,000,000. Defaults to 524,288. | |
| local_path | Yes | Path on the MCP host, resolved under the host user's permissions. | |
| compression | No | Wire compression: auto uses gzip only when worthwhile; gzip forces it; none disables it. | auto |
| lease_token | No | Opaque operation-bound lease from colab_allocation_probe. Null performs a fresh probe. | |
| remote_path | Yes | Runtime path confined to /content; relative paths resolve under /content. | |
| transfer_id | No | Opaque 32-character transfer ID from a failed upload. Reuse it to resume on the same incarnation; null starts a new transfer. | |
| max_total_bytes | No | Hard total transfer limit in bytes; checked before publication. | |
| compression_min_bytes | No | Auto mode only considers files at least this many content bytes; defaults to 1 MiB. | |
| compression_min_savings | No | Minimum fractional wire-byte saving required by auto mode; defaults to 0.10. |