view_file_content
Reads content of allowed configuration or web files within specified directories, enforcing size limits.
Instructions
Safely read the content of an authorized configuration or web file.
Permitted directories: /etc/nginx/, /etc/mysql/, /etc/postgresql/, /etc/docker/, /etc/caddy/, /var/www/ Strictly protected against path traversal attacks.
Args: file_path: Canonical path or relative path to the configuration file. max_bytes: Maximum bytes to return (default: 50,000, capped at 200,000).
Returns: JSON string with file content, size, and modification timestamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| max_bytes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |