s3_preview_object
Reads the first bytes of an S3 object via ranged GET to inspect file format, MIME type, or CSV header without downloading the full file.
Instructions
Read only the first bytes of an object (default and maximum 65536) with a ranged GET; read-only. Use it to inspect the format or header of a file of any size; use s3_get_object when you need the full body of a small object. Returns key, bytes, data, encoding (base64 is chosen automatically for binary data when encoding is omitted), content_type, detected_type (sniffed MIME type) and, for .csv keys or CSV content types, csv_header.
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": {
"bucket": "<bucket>",
"key": "<key>"
},
"name": "s3_preview_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Full object key inside the bucket, without the bucket name, e.g. "daily/archive.tar". | |
| bucket | Yes | Bucket name, e.g. "backups". Must be inside the configured bucket scope. | |
| encoding | No | "text" or "base64"; when omitted, text is used for valid UTF-8 and base64 otherwise. | |
| max_bytes | No | Number of leading bytes to read, 1-65536; default 65536. | |
| version_id | No | Object version ID from s3_list_object_versions; omit for the current version. |