Skip to main content
Glama
Svelte LSP as MCP

Svelte LSP as MCP

by pacnpal

svelte_format

Read-only

Preview formatting edits for saved or inline Svelte components using project configuration, so you can review changes before applying them.

Instructions

Preview text edits to format the component using its project configuration.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "svelte_format"
  }
}

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.
tabSizeNo
insertSpacesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/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 supplied structurally; the description's "Preview" wording is consistent with that. It adds that formatting rules come from the project configuration, which is genuinely useful context, but says nothing about the shape of the returned edits or what happens when no config exists.

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?

A single front-loaded sentence with no filler; the preview qualifier and the configuration source both earn their place.

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?

For a read-only formatting tool with no output schema, the description covers what the tool does and where its rules originate. The residual gap is the absence of any hint about the returned representation of edits or the file-vs-source precedence, though the schema documents the latter.

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 50%: file and source are documented in the schema, while tabSize and insertSpaces are undocumented in both schema and description. The description adds no parameter-level meaning beyond a vague link between "project configuration" and formatting options, so it neither compensates for the gap nor contradicts 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?

The description names a specific action ("Preview text edits"), the resource ("the component"), and the mechanism ("using its project configuration"), which clearly separates it from siblings like svelte_diagnostics or svelte_hover. It stops short of naming an alternative or contrasting behavior, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

"Preview" implies the edits are returned rather than applied, which is implied usage guidance. There is no explicit statement of when to choose this over other formatting/analysis tools, nor any note on prerequisites such as having a resolvable project config.

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