read_file
Read a workspace text file using UTF-8 or a chosen encoding, returning its path, size, encoding, and full contents; rejects missing, oversized, or invalid files.
Instructions
Read a UTF-8 (or other specified encoding) text file from the workspace.
Args: path: Path to the file, relative to the workspace root. encoding: Text encoding to decode with (default "utf-8").
Returns: The file's path, size in bytes, encoding, and full text content. Fails if the file does not exist, isn't a file, exceeds the configured max file size, or isn't valid text in that 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": {
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| encoding | No | utf-8 |