Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | No | Optional path to the Svelte project root. If omitted, use the load_project tool at runtime to set it. | |
| SVELTELS_TIMEOUT | No | LSP request timeout in ms (default: 30000) | 30000 |
| SVELTELS_SERVER_PATH | No | Override path to the svelteserver entry script |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| find_definition | Find the definition of a symbol by name in a file. |
| find_references | Find all references to a symbol across the workspace. |
| get_hover | Get hover documentation and type info for a symbol. |
| go_to_implementation | Find implementations of an interface or abstract method. |
| go_to_type_definition | Jump to the type definition of a symbol (e.g. find the class/interface of a variable). |
| find_document_symbols | List all symbols defined in a file. |
| find_workspace_symbols | Search for symbols across the entire workspace. |
| get_diagnostics | Get compiler errors, warnings, and diagnostics for a file. Opens the document to trigger computation if needed. |
| rename_symbol | Rename a symbol across the workspace. Applies changes to disk. |
| format_document | Format a file (or a range of lines) using the project's formatting rules. |
| get_code_actions | List available code actions (quick fixes, refactorings) for a line or range in a file. |
| apply_code_action | Apply a code action (quick fix, refactoring) by its title. Use get_code_actions first to see available actions. |
| get_completion | Get code completion suggestions at a symbol position. Useful for discovering available members, methods, and types. |
| get_signature_help | Get method signature overloads and parameter info at a symbol position. |
| incoming_calls | Find all functions/methods that call the specified symbol. |
| outgoing_calls | Find all functions/methods called by the specified symbol. |
| load_project | Load a Svelte project by its root directory. Restarts the language server pointed at the new workspace. Call this to switch between projects at runtime. |
| restart_lsp | Restart the Svelte language server. Use when the server is in a bad state or returning stale results. |
| get_compiled_code | Get the compiled JavaScript and CSS output for a Svelte component. Useful for debugging compilation issues. |
| get_component_references | Find all files that use/import a Svelte component. |
| get_file_references | Find all files that reference/import the specified file. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |