Skip to main content
Glama
Svelte LSP as MCP

Svelte LSP as MCP

by pacnpal

svelte_references

Read-only

Find all project references to a symbol at a specified position in Svelte components or files, helping you track usage and safely refactor code.

Instructions

Find project references to the symbol at a position.

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>"
    },
    "name": "svelte_references"
  }
}

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.
positionYes
includeDeclarationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. Beyond that the sentence adds almost nothing: it does not say whether results span the whole workspace, whether they include the declaration, or what the response contains. 'Project references' hints at workspace scope, but only faintly.

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 front-loaded sentence with no filler or redundant restatement of the name. Its brevity is efficient, though it tips into under-specification rather than tight economy.

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, a nested position object and no output schema, the description should explain the shape of what comes back (a list of reference locations) and the includeDeclaration toggle. Neither is covered, leaving real gaps for an LSP-style references call.

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 coverage is only 50%, and the description adds no meaning for any parameter. It never mentions includeDeclaration (which changes the result set) or clarifies the source-versus-file choice or the zero-based line/character position format, all of which live only partially in the schema.

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?

States a specific verb ('Find') and resource ('project references') scoped to 'the symbol at a position', which is distinguishable from a definition lookup. It stops short of naming any sibling (e.g. svelte_definition, svelte_rename), so an agent must infer the boundary itself.

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 when-to-use guidance and no exclusions. The agent is left to guess whether to reach for this or svelte_definition / svelte_rename when it wants to know where a symbol is used versus where it is declared or renamed.

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