read_file
Reads content of any server file with optional last N lines for large files. Inspect configs, logs, and other text files.
Instructions
读取服务器上任意文件内容(只读)。适合查看 Nginx 配置文件、PHP 配置、应用配置文件、自定义日志路径等。建议配合 last_lines 参数避免读取超大文件。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 服务器上文件的绝对路径,如 /etc/nginx/nginx.conf | |
| last_lines | No | 只读取最后 N 行。不填则返回全部内容(注意大文件请务必填此参数) |