Skip to main content
Glama

connect

Connect to a running Neovim instance via Unix socket or TCP. Auto-connects to a single instance or lists available ones for selection. Required before using other Neovim tools.

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
Behavior4/5

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

With no annotations, the description fully discloses the tool's behavior: auto-connect when one instance exists, listing instances when multiple, return format on success/error, and persistence. It does not mention potential blocking or network requirements, but these are implied in error details. Overall, high transparency for a connection tool.

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?

The description is well-structured: first sentence summarizes purpose, followed by usage context, auto-connect behavior, parameter details in bullets, and return format. Each sentence is informative and earns its place. Slight verbosity in some phrases (e.g., 'Called with no arguments:'), but overall efficient.

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 the tool's complexity (3 optional parameters, no output schema, no annotations), the description is complete. It covers all param semantics, return type, connection persistence, auto-connect behavior, and failure handling. It also establishes the tool as a prerequisite, providing sufficient context for correct invocation.

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 coverage is 0%, so the description does all the work. It explains each parameter with usage context: socket_path ('connect directly to a known Unix socket or host:port'), terminal_pid ('find the Neovim instance whose process tree contains this PID', with practical use case), and index ('pick from the listed instances, 1-based'). It also states that at most one can be provided.

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's purpose: 'Connect to a running Neovim instance over its Unix socket or TCP address.' It specifies the verb (connect), resource (Neovim instance), and method (Unix socket/TCP). The auto-connect behavior and optional selection methods are explained, distinguishing it from sibling tools which require a prior connection.

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?

Explicit usage guidance is provided: 'Call this before any other tool if the agent is not yet connected.' It notes persistence ('only need to call it once unless you want to switch instances') and explains when to use each optional parameter (index, socket_path, terminal_pid) with specific conditions, offering clear context for agent decision-making.

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