Read lines from a Neovim buffer
nvim_read_fileRead a file's content with line numbers using Neovim, optionally specifying a line range to handle large files efficiently.
Instructions
Read a file through Neovim with line numbers. Opens the file if needed. Use start_line and end_line to read a slice of a large file.
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": "nvim_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| end_line | No | Last line, inclusive | |
| start_line | No | First line, 1-based |