Skip to main content
Glama
Svelte LSP as MCP

Svelte LSP as MCP

by pacnpal

svelte_completions

Read-only

Lists Svelte code completion suggestions at a cursor position in saved .svelte files or supplied source, with offset and limit controls for paging results.

Instructions

List completion suggestions at the cursor. Use offset and limit to page through the result.

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_completions"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3/5.0
Behavior3/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. The description adds one genuinely useful behavior not in the annotations: results are paginated and must be walked with offset/limit. It omits what happens when neither file nor source is provided and gives no sense of result shape.

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 sentences, no filler, with the core action front-loaded and the paging note immediately after. Nothing could be removed without losing information.

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?

This is a five-parameter tool with a nested position object and no output schema, so the description must explain both input sourcing and return values. It does neither: the file-vs-source choice is undocumented and the agent is never told what a completion item looks like or how to detect an exhausted result set.

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 only 40%, so the description needs to carry more weight than it does. It explains offset and limit but says nothing about the required position object beyond 'at the cursor', nothing about the file/source mutual exclusivity, and nothing about the 200-item cap on limit.

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 and resource ('List completion suggestions') and pins the location ('at the cursor'), which is enough to separate it from siblings like svelte_hover or svelte_definition. It stops short of explicitly contrasting itself with those siblings, so it sits just below a 5.

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?

The only usage instruction is 'Use offset and limit to page through the result', which is parameter mechanics rather than when-to-use guidance. Nothing tells the agent when to pick this over svelte_hover or svelte_signature_help, nor that it requires either a file path or inline source.

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