read_text_file
Retrieve the content of a text file from the local filesystem, with configurable limits on bytes read to prevent large file overload.
Instructions
读取一个本地文本文件的内容。
Args: path: 文件的绝对路径或相对于 server 启动目录的相对路径。 max_bytes: 最多读取的字节数,防止把超大文件喂给 LLM,默认 64KB。
Returns: 文件文本内容(UTF-8 解码,非法字节会被替换)。
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_text_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_bytes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |