Skip to main content
Glama
beruang
by beruang

lsp_rename_preview

Preview a symbol rename operation without writing changes. Returns the WorkspaceEdit and a unified diff for review.

Instructions

Preview a rename operation. Returns the WorkspaceEdit and a unified diff. No files are written to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newNameYesThe new name for the symbol.
filePathYesAbsolute or workspace-relative path to the file.
positionYesLine/character position (zero-based) of the symbol to rename.
includeDiffNoWhether to include a unified diff in the response.
Behavior3/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 explains that no files are written (safe, read-only) and what is returned, which is good. However, it does not disclose potential error conditions, authentication needs, or server-side behavior changes. It is adequate but not thorough.

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-loading the action and then specifying the output and safety. Every sentence is essential and there is no wasted text.

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?

For a preview tool with 4 parameters and no output schema, the description covers the key aspects: what it does, what it returns, and that it does not modify files. It could be improved by mentioning the return value structure or error handling, but it is largely complete.

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%, so the baseline is 3. The description does not add any additional meaning beyond what the schema already provides for parameters. It relies entirely on the schema's parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Preview') and resource ('rename operation'), and clearly states the output (WorkspaceEdit and unified diff) and safety (no writes). It distinguishes from potential siblings like lsp_prepare_rename by emphasizing the preview and diff aspects, though not explicitly naming alternatives.

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

Usage Guidelines3/5

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

The description implies usage when a preview of a rename is desired, but does not explicitly state when to use this tool versus alternatives such as lsp_prepare_rename or lsp_workspace_edit_preview. No exclusions or context cues are provided.

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/beruang/lsp-mcp'

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