Skip to main content
Glama
Svelte LSP as MCP

Svelte LSP as MCP

by pacnpal

svelte_rename

Read-only

Preview workspace edits for renaming a symbol at a given position, letting you verify every affected file before applying the rename to a Svelte component.

Instructions

Preview the workspace edit for renaming a symbol.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "position": "<position>",
      "newName": "<newName>"
    },
    "name": "svelte_rename"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoPath to a saved .svelte component inside the workspace. Relative paths start at the workspace root.
sourceNoFull Svelte component source. Supply source or file. Source uses the bundled Svelte runtime.
newNameYesProposed symbol name.
positionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and "Preview" is consistent with that non-mutating profile. However, the description does not disclose what happens when the position does not resolve to a symbol, that the returned edit is not applied, or anything about the shape of the preview — useful context an agent would need.

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?

A single short sentence with the key concept front-loaded and no filler. It is efficient, though its brevity borders on under-specification rather than tightness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four parameters including a nested object, no output schema, and no annotations explaining the return value, the description should say more about what the preview produces and how the source/file inputs interact. As written, an agent knows the intent but not the inputs' interplay or the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75% and all four parameters (file, source, newName, nested position) are documented in the schema itself. The description adds no meaning beyond that — it does not explain the file-vs-source choice, the significance of the line/character position, or what newName constraints apply.

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 gives a specific verb ("Preview") and resource ("the workspace edit for renaming a symbol"), so an agent can tell this computes a rename edit rather than applying it. It does not name or distinguish itself from any sibling, but no sibling in the list performs renames, so the gap is minor.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to call this versus other navigation tools, no mention of prerequisites (e.g., the position must resolve to a symbol), and no note that source or file is required to supply context. The only hint is the word "Preview," which implies a dry-run workflow but leaves the agent to infer it.

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