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 参数避免读取超大文件。
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": {
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 服务器上文件的绝对路径,如 /etc/nginx/nginx.conf | |
| last_lines | No | 只读取最后 N 行。不填则返回全部内容(注意大文件请务必填此参数) |