Skip to main content
Glama

LSP rename symbol

nvim_lsp_rename

Rename the symbol at a position project-wide via the language server and apply the resulting edits (set apply=false to preview which files would change without modifying anything).

Instructions

Rename the symbol at a position project-wide via the language server and apply the resulting edits (set apply=false to preview which files would change without modifying anything).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colNo1-based column number. Default 1.
lineNo1-based line number. Default 1.
pathNoTarget buffer by file path (must already be open). Ignored if bufnr is set.
applyNoApply the edits. Default true.
bufnrNoTarget buffer number. Omit to use the path or the current buffer.
newNameYesThe new name for the symbol.
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 of behavior disclosure. It explicitly notes that the tool applies edits project-wide and that setting apply=false previews without modifying anything, which is important mutation context. It does not mention permissions or undo, but the core safety behavior is well disclosed.

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 a single, front-loaded sentence that conveys the core action, scope, mechanism, and a key option without wasted words. It is concise and to the point.

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 the comprehensive schema with 100% parameter coverage and the description's coverage of the apply/preview behavior, the tool is well explained. There is no output schema, but the description sufficiently conveys what the tool does and its main mode switch, so only minor details like return structure are absent.

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

Parameters4/5

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

The schema already covers all parameters with descriptions, giving a baseline of 3. The description adds value by clarifying the practical effect of the apply parameter (preview vs. apply) and by framing the line/col as a position, which goes beyond the raw schema fields.

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 renames a symbol at a position project-wide via the language server, using a specific verb and resource. It also differentiates this from sibling LSP tools like hover or references by specifying the rename action and its project-wide scope.

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 use (renaming symbols project-wide) and gives actionable guidance on the apply parameter to preview changes. It does not explicitly mention alternatives, but no sibling tool provides the same rename capability, so the usage context is clear enough.

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