read_file
Read a file from the filesystem and return its content as text, or base64-encoded string if binary, with configurable size limits and encoding.
Instructions
Read a file from the filesystem.
Returns the file content as text. Binary files are returned as base64-encoded strings
with is_binary=True. Supports configurable size limits and encoding.
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": {
"request": "<request>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | Request model for read_file tool. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path that was read. | |
| size | Yes | File size in bytes. | |
| content | Yes | File content as text. | |
| encoding | Yes | Encoding used to read the file. | |
| is_binary | Yes | Whether the file was detected as binary. |