Skip to main content
Glama

rename_symbol

Rename a symbol across the entire workspace using LSP. Preview changes with dry_run, exclude files with glob patterns, and target positions reliably.

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
lineNo
columnNo
dry_runNo
new_nameYes
file_pathYes
language_idNo
exclude_globsNo
position_patternNo
Behavior5/5

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

No annotations provided, so description fully carries burden. Discloses that edit is not applied automatically, dry_run returns workspace_edit+note, and that position_pattern provides reliable targeting. No contradictions.

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?

Description is appropriately sized for a complex tool, front-loaded with core purpose, then methodically covers usage patterns. Every sentence adds value without redundancy.

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 8 parameters, no output schema, and no annotations, description covers all major aspects: core purpose, two usage paths (dry_run vs apply), position targeting, and exclusion patterns. Sufficient for agent to use tool correctly.

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?

With 0% schema description coverage, description adds meaning for key parameters: dry_run, position_pattern, exclude_globs. Explains purpose of position_pattern vs line/column, and how exclude_globs works. Provides guidance beyond raw schema.

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 it returns a WorkspaceEdit for renaming a symbol across the workspace via LSP. Distinguishes from sibling tools like apply_edit and prepare_rename by specifying it returns an edit object that is not automatically applied.

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 explains when to use dry_run to preview, recommends position_pattern with @@ marker instead of line/column, instructs to inspect the edit then call apply_edit to commit, and describes exclude_globs for skipping generated files.

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