Skip to main content
Glama
Svelte LSP as MCP

Svelte LSP as MCP

by pacnpal

svelte_hover

Read-only

Show type information and documentation at a specific cursor position in Svelte components, helping you understand symbols and APIs without leaving your editor.

Instructions

Show type information and documentation 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_hover"
  }
}

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/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. The description adds nothing further — not what the returned documentation looks like, whether null/empty is possible when no symbol is under the cursor, or whether both file and source may be supplied. With annotations present the bar is lower, but zero added context merits a 2.

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 wasted words. Brevity here reflects under-specification rather than tight writing, but the sentence itself is clean and immediately readable.

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?

For a hover tool whose entire payload is the returned markdown/type string, and with no output schema, the description never says what comes back or how to interpret an empty result. The nested position object and the file/source alternative also go unaddressed, leaving the definition thinner than the tool's 3-parameter surface warrants.

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%, with file, source, and the nested position line/character all described in the schema itself (including UTF-16 offset semantics). The description adds no meaning beyond that — no mention of the file-vs-source choice or the zero-based position convention — so the baseline 3 applies.

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?

A specific verb ('Show') plus a concrete resource ('type information and documentation') at a position — an agent knows the operation is a hover-style read. However, it does not distinguish itself from close siblings like svelte_type_definition or svelte_definition, which sound like they could return the same type info.

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?

No when-to-use guidance at all: nothing says to use this for hovering/inspecting types rather than jumping to a definition, nor whether it requires a saved file versus in-memory source. The only routing information exists implicitly in the schema's file/source fields, not the description.

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