Read terminal
nvim_terminal_readRead the rendered contents (scrollback and current screen) of a Neovim terminal buffer. Optionally trim trailing blank lines. Useful for capturing terminal output.
Instructions
Read the rendered contents (scrollback + current screen) of a terminal buffer. Trailing blank lines are trimmed by default.
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": {
"bufnr": "<bufnr>"
},
"name": "nvim_terminal_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bufnr | Yes | Terminal buffer number. | |
| stripTrailingBlank | No | Trim trailing blank lines. Default true. |