read
Retrieves file text with line numbers or raster images, detects common encodings, pages large content via offset/limit, and reports truncation and next offset.
Instructions
Read text with line numbers or return raster images as ImageContent. Detects common encodings; SVG stays text. Text is bounded and reports truncation/next_offset. Use offset/limit to page; relative paths use the workspace or MCP root.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Disable line cap; character cap remains | |
| path | No | Alias for file_path | |
| limit | No | Line limit; default 400. Use 0 or all=true for no line cap | |
| offset | No | Start line: 1-based integer, negative from end, 'start-end', or [start,end]; default 1 | |
| encoding | No | Charset override, e.g. EUC-KR or Shift_JIS; overrides .editorconfig, BOM takes priority | |
| end_line | No | Inclusive end with start_line | |
| file_path | No | Workspace-relative, absolute, or @name/subpath (directory_alias) | |
| start_line | No | Alias for offset | |
| include_hash | No | Include SHA-256; default true | |
| max_line_chars | No | Per-line character cap; default 4000, max 32768 | |
| max_output_chars | No | Output character cap; default 32768, min 256, max 131072 |