Skip to main content
Glama

rename_symbol

Rename code symbols across your entire workspace using Language Server Protocol. Preview changes before applying, exclude specific files, and ensure accurate refactoring with position-based targeting.

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

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

With no annotations provided, the description carries the full burden and excels in disclosing behavioral traits. It explains that the tool returns a WorkspaceEdit without automatic application, details the dry_run option for previewing changes, describes how to use position_pattern for reliable targeting, and specifies that exclude_globs skips files (e.g., for generated code). This covers mutation behavior, safety mechanisms, and operational constraints comprehensively.

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 appropriately sized and front-loaded, with every sentence earning its place. It starts with the core purpose, immediately follows with key usage instructions (dry_run, position_pattern), and ends with optional parameter details (exclude_globs). There is no redundant information, and the structure logically flows from general to specific, making it efficient and easy to parse.

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?

For a complex tool with 8 parameters, 0% schema coverage, no annotations, and no output schema, the description is remarkably complete. It covers the tool's purpose, behavioral traits (e.g., non-automatic application, preview capability), parameter semantics for key options, and integration with sibling tools (apply_edit). This provides sufficient context for an agent to understand and invoke the tool correctly despite the lack of structured data.

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?

Given 0% schema description coverage for 8 parameters, the description compensates fully by adding meaning beyond the schema. It explains the purpose of dry_run ('to preview what would change'), position_pattern ('with @@ marker for reliable position targeting instead of line/column'), and exclude_globs ('skips matching files from the rename — useful for generated code, vendored files, and test fixtures'), providing crucial context that the schema lacks.

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: 'Get a WorkspaceEdit for renaming a symbol across the entire workspace via LSP.' It specifies the verb ('rename'), resource ('symbol'), scope ('across the entire workspace'), and mechanism ('via LSP'), distinguishing it from siblings like 'prepare_rename' or 'simulate_edit' by emphasizing it returns an edit object without automatic application.

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?

The description provides explicit guidance on when and how to use this tool: 'Use dry_run=true to preview what would change' and 'Inspect the returned WorkspaceEdit then call apply_edit to commit.' It distinguishes usage from alternatives by noting it returns an edit object 'NOT applied automatically,' implying 'apply_edit' is needed for actual changes, and mentions 'position_pattern' as a reliable alternative to 'line/column' targeting.

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