Skip to main content
Glama

Read terminal

nvim_terminal_read

Read 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bufnrYesTerminal buffer number.
stripTrailingBlankNoTrim trailing blank lines. Default true.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses that the tool reads rendered, not raw, contents and that trailing blank lines are trimmed by default. This adds meaningful context beyond the schema. However, it does not explicitly state read-only/no side effects or error behavior for non-terminal buffers, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the primary action ('Read the rendered contents') and appends a key behavioral detail (trailing blank line trimming). No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with two parameters and no output schema, the description covers the core purpose and one behavioral nuance. However, it does not clarify the return format (string vs lines) nor differentiate from nvim_read_buffer explicitly, leaving some contextual gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%—both bufnr and stripTrailingBlank have clear descriptions. The tool description does not add any additional parameter-level details; it only mentions the default trimming behavior, which is already in the schema. This meets the baseline for full schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads the rendered contents (scrollback + current screen) of a terminal buffer. This distinguishes it from sibling tools like nvim_read_buffer (likely for normal buffers) and nvim_terminal_send (writes). The verb 'read' and resource 'terminal buffer' are explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for terminal buffers, but does not explicitly state when to use it over nvim_read_buffer or provide exclusions. For example, it doesn't mention that nvim_read_buffer may not include scrollback or is for non-terminal buffers. Thus, usage guidance is implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shooooooooo/nvim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server