fetch_output_file
Retrieve output files from compliance rule executions including reports, logs, and compliance data, with size-based content display and direct download URLs.
Instructions
Fetch and display content of an output file from rule execution.
FILE OUTPUT HANDLING:
WHEN TO USE:
Rule execution output contains file URLs
User requests to view specific file content
Files contain reports, logs, compliance data, or analysis results
CONTENT DISPLAY LOGIC:
If file size < 10KB: Show entire file content
If file size >= 10KB: Show only first 3 records/lines with user-friendly message
Supported formats: JSON, CSV, Parquet, and other text files
Always return file format extracted from filename
Provide clear user messaging about content truncation
CRITICAL: If content is truncated or full content, include truncation message with the display_content
The file URL (file_url) must ALWAYS be displayed to the user in the UI, allowing the user to view or download the file directly.
MANDATORY CONTENT DISPLAY FORMAT:
FileName: [extracted from file_url]
Format: [file format from file_format]
Message: [truncation status or completion message if applicable user_message]
Content: [display_content based on file format show the entire display_content]
File URL: [always show the file_url in the UI so the user can view or download the file] Args: file_url: URL of the file to fetch and display
Returns: Dict containing file content, metadata, and display information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||