Skip to main content
Glama

rename_symbol

Generate a WorkspaceEdit to rename a symbol across the entire workspace using LSP. Preview changes with dry_run and refine targeting with position patterns, then apply the edit with a separate call.

Instructions

Get a WorkspaceEdit for renaming a symbol across the entire workspace via LSP. Returns the edit object — NOT applied automatically. Use dry_run=true to preview what would change (returns workspace_edit + note). Use position_pattern with @@ marker for reliable position targeting instead of line/column. Inspect the returned WorkspaceEdit then call apply_edit to commit. Optional exclude_globs (array of glob patterns, e.g. ["vendor/", "/*_gen.go"]) skips matching files from the rename — useful for generated code, vendored files, and test fixtures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
lineNo
columnNo
new_nameYes
position_patternNo
dry_runNo
exclude_globsNo
Behavior4/5

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

With no annotations provided, the description takes full responsibility for behavioral disclosure. It clearly explains that the tool returns a WorkspaceEdit object, does not apply changes automatically, and provides dry-run preview. It also details the position_pattern and exclude_globs features. Minor gap: it doesn't mention error behavior or what happens when the rename is not possible.

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 a single paragraph that starts with the core purpose and then provides actionable usage details. It is informative without being overly verbose. Could be improved with structure (e.g., bullet points), but the content is well-organized.

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 tool's complexity (8 parameters, no output schema), the description covers the essential usage patterns: dry-run, position targeting, exclusions, and the apply_edit follow-up. It lacks details on error cases or return format beyond WorkspaceEdit, but overall provides a solid context for correct invocation.

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?

The input schema has 8 parameters with 0% description coverage, but the description adds meaning for key parameters: dry_run, position_pattern, exclude_globs. It explains why position_pattern is preferred over line/column. However, file_path and new_name are left to common sense, and line/column are not elaborated. Overall, adds value beyond schema but incomplete.

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 gets a WorkspaceEdit for renaming a symbol via LSP, and explicitly notes it returns an edit object that is NOT applied automatically. This distinguishes it from sibling tools like 'apply_edit' or 'prepare_rename'.

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 explicit guidance on using dry_run=true to preview changes, using position_pattern with @@ marker for reliable targeting, and the workflow of applying edits. It also covers exclude_globs usage. It does not explicitly state when NOT to use this tool, but the guidance is clear enough for proper selection.

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/blackwell-systems/agent-lsp'

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