Skip to main content
Glama

Restart Language Server

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));
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implies this is a corrective action for server issues but doesn't disclose behavioral details like whether it requires specific permissions, if it interrupts ongoing operations, or what happens after restart. It adds some context about server states but lacks comprehensive transparency.

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?

The description is two sentences with zero waste: the first states the purpose, and the second provides usage guidelines. It's front-loaded and appropriately sized, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple restart operation), no annotations, no output schema, and 0 parameters, the description is somewhat complete but could be improved. It explains when to use it but lacks details on behavioral outcomes or error handling, making it adequate but with gaps for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter semantics, and it doesn't contradict the schema. A baseline of 4 is appropriate since no parameters exist to explain.

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 clearly states the verb ('Restart') and resource ('Svelte language server'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'load_project' which might also affect server state, keeping it from a perfect score.

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

Usage Guidelines4/5

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

The description provides explicit guidance on when to use the tool ('when the server is in a bad state or returning stale results'), which is helpful. It doesn't mention when not to use it or name specific alternatives among siblings, preventing a score of 5.

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

Install Server

Other Tools

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