Skip to main content
Glama
office233
by office233

lsp_rename_preview

Read-onlyIdempotent

Preview all workspace edits a semantic rename would make without writing files. Review changes first, then apply them through apply_patch or edit_file.

Instructions

Preview the exact workspace edits a semantic rename would make. Does not write files; apply reviewed changes through apply_patch/edit_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesSource file
lineYes1-based line
limitNo
symbolNoIdentifier on that line; its column is found automatically
newNameYes
characterNo1-based column (or give symbol instead)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered structurally; the description's 'does not write files' reinforces but does not extend that. It adds the useful workflow fact that reviewed changes go through apply_patch/edit_file, but says nothing about truncation of the preview (relevant given the limit parameter) or how edits are ordered/grouped.

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?

Two tight sentences with zero filler; the read-only constraint and the handoff to apply_patch/edit_file are both front-loaded and immediately actionable.

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?

With no output schema, the description adequately signals the return value type (a set of workspace edits) and the next action. The remaining gap is the limit/truncation behavior, which matters for an agent reading a large preview, but overall the definition is usable as-is.

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 coverage is 67%, so file/line/symbol/character are documented by the schema itself, but the description adds no meaning to any parameter. The 'limit' parameter (default 200) is undocumented in both places, leaving its truncation semantics unexplained despite being the main behavioral risk of a preview.

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?

States a specific verb and resource ('Preview the exact workspace edits a semantic rename would make'), which is unambiguous and clearly distinct from the browser/pty/file siblings. An agent knows it produces a dry-run of a rename, not the rename itself.

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?

Explicitly says 'Does not write files' and names the follow-up tools (apply_patch/edit_file), which tells the agent both what this tool is not for and how to complete the workflow. It stops short of stating when a preview is required versus optional, so it is not fully prescriptive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools