Skip to main content
Glama

Run an Ex command

nvim_command

Execute Neovim Ex commands and receive Neovim's error messages if rejected. Does not wait for the screen to settle.

Instructions

Execute an Ex command. A command that Neovim rejects comes back as an error result with Neovim's own message. Like nvim_input, this does not wait for the screen to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesEx command without the leading colon, e.g. "set number", "edit foo.txt", "wq".
sessionIdYesSession id returned by nvim_launch or nvim_attach.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
commandYes
sessionIdYes
Behavior4/5

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

With no annotations, the description carries the full burden of disclosing behavior. It explains that rejected commands return errors with Neovim's own message and that it does not wait for the screen to settle, both important behavioral traits. This goes beyond basic semantics and provides useful operational context.

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 two sentences, front-loaded with the primary action, and every word earns its place. It efficiently conveys purpose, error behavior, and synchronization semantics without unnecessary elaboration.

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?

The tool has a simple interface with two well-documented parameters and an output schema, so the description does not need to explain return values. It covers error handling and the non-waiting behavior, which are key contextual details. Minor aspects like session validity or permission requirements are not mentioned, but they are implied by the schema.

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?

The input schema has 100% coverage with detailed parameter descriptions, including examples for the command parameter and source of sessionId. The tool description adds no additional parameter-level details beyond what's in the schema, so it appropriately relies on the structured definitions.

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 'Execute an Ex command' with a specific verb and resource. It distinguishes from siblings by explicitly referencing nvim_input and contrasting the behavior, making it clear this tool is for Ex commands rather than key input or observation.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when an Ex command needs to be executed. The mention of 'Like nvim_input' gives an implicit comparison, but it does not explicitly state when to prefer one over the other or mention alternatives for error handling. Still, the purpose is unambiguous.

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/kjoonha/nvim-ui-mcp'

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