Skip to main content
Glama

Open a terminal

nvim_open_terminal

Opens a persistent terminal in Neovim for interactive or long-running sessions, returning buffer, channel, and job IDs to send input and read output.

Instructions

Open a persistent terminal inside Neovim and return its buffer number, channel and job id. Use nvim_terminal_send to type into it and nvim_terminal_read to read its screen. Use this for interactive or long-running sessions; for one-shot commands prefer nvim_run_in_terminal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cmdNoProgram to run. Default: the user's shell.
cwdNoWorking directory.
nameNoOptional display name for the terminal buffer.
focusNoMove the cursor into the terminal window. Default false.
splitNoWhere to show it. Default 'horizontal'.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: persistence, return of buffer number/channel/job id, and interaction via send/read. It does not mention side effects like window splitting or process backgrounding, but the phrase 'persistent terminal' implies continued execution. This adds meaningful context beyond the schema, though it could be more detailed about side effects.

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 concise: two sentences, front-loaded with the primary action, followed by usage guidance and alternative. Every sentence adds value, with no redundant or filler content.

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

Completeness4/5

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

Given 5 parameters, no output schema, and no annotations, the description is sufficiently complete. It explains the return values (buffer number, channel, job id) and when to use the tool vs siblings. It lacks details about window split behavior or non-blocking nature, but those are less critical and partially covered by schema. Overall the description provides enough context for correct use.

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 coverage is 100%, so the baseline is 3. The description does not add much beyond schema for parameters—it does not explain cmd, cwd, name, focus, or split semantics. The schema descriptions already cover these, so the description's lack of parameter detail is acceptable.

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 specific verb+resource: 'Open a persistent terminal inside Neovim and return its buffer number, channel and job id.' It distinguishes itself from sibling nvim_run_in_terminal by emphasizing persistence and long-running sessions, and from nvim_terminal_send/read by mentioning them as complementary tools. The purpose is unambiguous and specific.

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

Usage Guidelines5/5

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

The description explicitly provides usage guidance: 'Use this for interactive or long-running sessions; for one-shot commands prefer nvim_run_in_terminal.' It also names nvim_terminal_send and nvim_terminal_read as the intended follow-up tools, giving clear context for when to use this tool vs alternatives.

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