Skip to main content
Glama

connect

Establish a persistent connection to a running Neovim instance via Unix socket or TCP. Automatically connects when exactly one instance is found, otherwise returns a list for selection.

Instructions

Connect to a running Neovim instance over its Unix socket or TCP address.

Call this before any other tool if the agent is not yet connected. Connection is persistent for the session; you only need to call it once unless you want to switch instances.

Called with no arguments: auto-connects when exactly one instance is running; returns a list of instances when multiple are found.

Optional selection (provide at most one):

  • index: pick from the listed instances (1-based).

  • socket_path: connect directly to a known Unix socket or host:port.

  • terminal_pid: find the Neovim instance whose process tree contains this PID (useful when Neovim runs inside a specific terminal).

Returns {connected, cwd, file} on success, or {error} with details on failure (e.g. no instances found, connection timeout, bad index).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
socket_pathNo
terminal_pidNo
indexNo
Behavior5/5

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

Fully discloses auto-connect logic, error conditions (no instances, timeout, bad index), and return structure. No annotations present, so description carries full burden.

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

Conciseness4/5

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

Well-structured with bullet points, but slightly longer than minimal. Still every sentence adds value and front-loaded with main purpose.

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?

Covers all necessary aspects: prerequisites (call first), behavior (auto-connect, selection), return values on success/failure, despite no annotations or output schema.

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

Parameters5/5

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

Schema has 0% coverage (only titles), but description adds semantics for each parameter: index meaning 1-based, socket path as Unix or host:port, terminal_pid as process tree lookup.

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?

Clearly states 'Connect to a running Neovim instance' with specific transport methods. Distinguishes from sibling tools like read/write/send commands.

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?

Explicitly says 'Call this before any other tool' and explains when to call with no arguments vs. with selection parameters. Also notes connection is persistent.

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

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