read_s3_file
Read files from Amazon S3 storage to display CSV, JSON, logs, or Parquet data directly in chat with filtering and preview options.
Instructions
Read any file from S3 by its full URI and display in chat.
Supports CSV, TXT, JSON, log files, .gz compressed files, and Parquet. Files larger than 5 MB are rejected to avoid crashing the server.
For Parquet files: reads the file and displays the first N rows as a formatted table (default 50 rows). Parquet files are binary so they cannot be tailed or searched — use head_rows to control output.
Args: s3_uri: Full S3 URI (e.g. 's3://bucket-name/path/to/file.csv'). tail_lines: Lines from the end for text files (default 100). -1 for all. search_text: Filter matching lines (text files only). head_rows: Rows to display for Parquet files (default 50). env: Target environment — 'dev', 'uat', 'test', or 'prod'. IMPORTANT: Do NOT guess or default. Ask the user which environment if not specified.
Returns the file contents, optionally filtered and tailed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| s3_uri | Yes | ||
| tail_lines | No | ||
| search_text | No | ||
| head_rows | No | ||
| env | No |