Skip to main content
Glama

restart_lsp

Restart the Svelte language server to resolve issues with stale results or unstable performance during Svelte development.

Instructions

Restart the Svelte language server. Use when the server is in a bad state or returning stale results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `restart_lsp` tool registration and handler implementation. It calls `lsp.restart()` to perform the restart.
    server.registerTool(
      "restart_lsp",
      {
        title: "Restart Language Server",
        description:
          "Restart the Svelte language server. Use when the server is in a bad state or returning stale results.",
      },
      async (): Promise<ToolResult> => {
        try {
          if (!lsp.isProjectLoaded) {
            return textResult(
              "No project loaded. Call the load_project tool first."
            );
          }
          await lsp.restart();
          return textResult(
            "Svelte language server restarted successfully. First requests may be slow as it re-indexes."
          );
        } catch (ex) {
          return textResult(formatError(ex));
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adainrivers/SvelteLS.MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server