Skip to main content
Glama

Wait for Neovim

nvim_wait

Block until the Neovim UI reaches a desired state, preventing race conditions when observing the screen. On timeout, the captured screen enables quick diagnosis.

Instructions

Block until a screen condition holds, so an observation is not raced against the redraw it is meant to see. On timeout the error includes the screen as it was, so a failed wait is diagnosable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoRequired for contains and not-contains.
idleMsNoQuiet period for the idle condition. Default 100.
conditionYesredraw: next completed frame. screen-change: rendered text differs from now. idle: no redraw for idleMs, the safest choice after an action that triggers several frames. contains/not-contains: wait for text to appear/disappear on screen.
sessionIdYesSession id returned by nvim_launch or nvim_attach.
timeoutMsNoGive up after this long. Default 5000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitedMsYes
conditionYes
sessionIdYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool blocks until a condition holds and that a timeout error includes the screen state for diagnosability. This covers key behavioral traits, though it does not explicitly state that it is read-only or mention other 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 two concise sentences. The first front-loads the core purpose, and the second adds important error behavior. No wasted words and the structure is clear.

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

Completeness5/5

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

Given an output schema exists, the description need not explain return values. It provides enough context for when to use the tool (to avoid racing observations with redraws) and discloses timeout diagnostics. Combined with the rich schema, this is complete for an agent to select and invoke correctly.

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%, and the schema already explains all parameters and their semantics. The description adds no specific parameter details beyond framing the 'screen condition' concept, so the baseline of 3 is appropriate.

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 uses a specific verb ('Block until') and resource ('a screen condition holds'), clearly stating the tool's function. It also differentiates itself from sibling tools by framing the wait as preventing observation from racing against a redraw, which is unique among the nvim_* tools.

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: use this tool to synchronize with the screen before observing, avoiding race conditions. However, it does not explicitly name alternatives or state when not to use it, so it falls just short of a 5.

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