LSP MCP Server for Rell
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LSP MCP Server for Rellwhat are the diagnostics for my current project?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LSP MCP Server for Rell
An MCP (Model Context Protocol) server for interacting with the Rell Language Server Protocol (LSP) interface. This server acts as a bridge that allows LLMs to query LSP Hover and Completion providers for Rell projects.
Note: This project is based on @Tritlo/lsp-mcp with slight modifications to remove all extensions and use it specifically with the default Rell language server. The Rell LSP JAR file is automatically downloaded and managed by this server.
Overview
The MCP Server works by:
Starting an LSP client that connects to a LSP server
Exposing MCP tools that send requests to the LSP server
Returning the results in a format that LLMs can understand and use
This enables LLMs to utilize the Rell LSP for more accurate code suggestions and analysis.
Related MCP server: VSCode LSP MCP Server
Configuration:
{
"mcpServers": {
"rell-lsp-mcp": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/this/project/dist/index.js"
]
}
}
}Features
MCP Tools
get_info_on_location: Get hover information at a specific location in a fileget_completions: Get completion suggestions at a specific location in a fileget_code_actions: Get code actions for a specific range in a fileopen_document: Open a file in the LSP server for analysisclose_document: Close a file in the LSP serverget_diagnostics: Get diagnostic messages (errors, warnings) for open filesstart_lsp: Start the LSP server with a specified root directoryrestart_lsp_server: Restart the LSP server without restarting the MCP serverset_log_level: Change the server's logging verbosity level at runtime
MCP Resources
lsp-diagnostics://resources for accessing diagnostic messages with real-time updates via subscriptionslsp-hover://resources for retrieving hover information at specific file locationslsp-completions://resources for getting code completion suggestions at specific positions
Additional Features
Comprehensive logging system with multiple severity levels
Colorized console output for better readability
Runtime-configurable log level
Detailed error handling and reporting
Simple command-line interface
Prerequisites
Node.js (v16 or later)
npm
Java JDK (for running the Rell LSP server)
Installation
Building the MCP Server
Clone this repository:
git clone <-repository-url> cd lsp-mcpInstall dependencies:
npm installBuild the MCP server:
npm run build
Testing
The project includes integration tests for the Rell LSP support. These tests verify that the LSP-MCP server correctly handles LSP operations like hover information, completions, diagnostics, and code actions with the Rell language server.
Running Tests
To run the Rell LSP tests:
npm testTest Coverage
The tests verify the following functionality:
Automatic downloading and initialization of the Rell LSP server
Opening Rell files for analysis
Getting hover information for functions and types
Getting code completion suggestions
Getting diagnostic error messages
Getting code actions for errors
Usage
Run the MCP server directly with Node.js:
node dist/index.jsThe server automatically downloads and manages the Rell LSP server JAR file, so no additional configuration is needed. The Rell LSP server will be downloaded to ~/chromia/lsp-mcp/ on first use.
Important: Starting the LSP Server
You must explicitly start the LSP server by calling the start_lsp tool before using any LSP functionality. This ensures proper initialization with the correct root directory for your Rell project:
{
"tool": "start_lsp",
"arguments": {
"root_dir": "/path/to/your/project"
}
}Logging
The server includes a comprehensive logging system with 8 severity levels:
debug: Detailed information for debugging purposesinfo: General informational messages about system operationnotice: Significant operational eventswarning: Potential issues that might need attentionerror: Error conditions that affect operation but don't halt the systemcritical: Critical conditions requiring immediate attentionalert: System is in an unstable stateemergency: System is unusable
By default, logs are sent to:
Console output with color-coding for better readability
MCP notifications to the client (via the
notifications/messagemethod)
Viewing Debug Logs
For detailed debugging, you can:
Use the
claude --mcp-debugflag when running Claude to see all MCP traffic between Claude and the server:claude --mcp-debugChange the log level at runtime using the
set_log_leveltool:{ "tool": "set_log_level", "arguments": { "level": "debug" } }
The default log level is info, which shows moderate operational detail while filtering out verbose debug messages.
API
The server provides the following MCP tools:
get_info_on_location
Gets hover information at a specific location in a file.
Parameters:
file_path: Path to the fileline: Line numbercolumn: Column position
Example:
{
"tool": "get_info_on_location",
"arguments": {
"file_path": "/path/to/your/file.rell",
"line": 3,
"column": 5
}
}get_completions
Gets completion suggestions at a specific location in a file.
Parameters:
file_path: Path to the fileline: Line numbercolumn: Column position
Example:
{
"tool": "get_completions",
"arguments": {
"file_path": "/path/to/your/file.rell",
"line": 3,
"column": 10
}
}get_code_actions
Gets code actions for a specific range in a file.
Parameters:
file_path: Path to the filestart_line: Start line numberstart_column: Start column positionend_line: End line numberend_column: End column position
Example:
{
"tool": "get_code_actions",
"arguments": {
"file_path": "/path/to/your/file.rell",
"start_line": 3,
"start_column": 5,
"end_line": 3,
"end_column": 10
}
}start_lsp
Starts the LSP server with a specified root directory. This must be called before using any other LSP-related tools.
Parameters:
root_dir: The root directory for the LSP server (absolute path recommended)
Example:
{
"tool": "start_lsp",
"arguments": {
"root_dir": "/path/to/your/project"
}
}restart_lsp_server
Restarts the LSP server process without restarting the MCP server. This is useful for recovering from LSP server issues or for applying changes to the LSP server configuration.
Parameters:
root_dir: (Optional) The root directory for the LSP server. If provided, the server will be initialized with this directory after restart.
Example without root_dir (uses previously set root directory):
{
"tool": "restart_lsp_server",
"arguments": {}
}Example with root_dir:
{
"tool": "restart_lsp_server",
"arguments": {
"root_dir": "/path/to/your/project"
}
}open_document
Opens a file in the LSP server for analysis. This must be called before accessing diagnostics or performing other operations on the file.
Parameters:
file_path: Path to the file to open
Example:
{
"tool": "open_document",
"arguments": {
"file_path": "/path/to/your/file.rell",
}
}close_document
Closes a file in the LSP server when you're done working with it. This helps manage resources and cleanup.
Parameters:
file_path: Path to the file to close
Example:
{
"tool": "close_document",
"arguments": {
"file_path": "/path/to/your/file"
}
}get_diagnostics
Gets diagnostic messages (errors, warnings) for one or all open files.
Parameters:
file_path: (Optional) Path to the file to get diagnostics for. If not provided, returns diagnostics for all open files.
Example for a specific file:
{
"tool": "get_diagnostics",
"arguments": {
"file_path": "/path/to/your/file"
}
}Example for all open files:
{
"tool": "get_diagnostics",
"arguments": {}
}set_log_level
Sets the server's logging level to control verbosity of log messages.
Parameters:
level: The logging level to set. One of:debug,info,notice,warning,error,critical,alert,emergency.
Example:
{
"tool": "set_log_level",
"arguments": {
"level": "debug"
}
}MCP Resources
In addition to tools, the server provides resources for accessing LSP features including diagnostics, hover information, and code completions:
Diagnostic Resources
The server exposes diagnostic information via the lsp-diagnostics:// resource scheme. These resources can be subscribed to for real-time updates when diagnostics change.
Resource URIs:
lsp-diagnostics://- Diagnostics for all open fileslsp-diagnostics:///path/to/file- Diagnostics for a specific file
Important: Files must be opened using the open_document tool before diagnostics can be accessed.
Hover Information Resources
The server exposes hover information via the lsp-hover:// resource scheme. This allows you to get information about code elements at specific positions in files.
Resource URI format:
lsp-hover:///path/to/file?line={line}&column={column}&language_id={language_id}Parameters:
line: Line number (1-based)column: Column position (1-based)
Example:
lsp-hover:///home/user/project/src/main.rell?line=42&column=10&language_id=rellCode Completion Resources
The server exposes code completion suggestions via the lsp-completions:// resource scheme. This allows you to get completion candidates at specific positions in files.
Resource URI format:
lsp-completions:///path/to/file?line={line}&column={column}&language_id={language_id}Parameters:
line: Line number (1-based)column: Column position (1-based)
Example:
lsp-completions:///home/user/project/src/main.rell?line=42&column=10Listing Available Resources
To discover available resources, use the MCP resources/list endpoint. The response will include all available resources for currently open files, including:
Diagnostics resources for all open files
Hover information templates for all open files
Code completion templates for all open files
Subscribing to Resource Updates
Diagnostic resources support subscriptions to receive real-time updates when diagnostics change (e.g., when files are modified and new errors or warnings appear). Subscribe to diagnostic resources using the MCP resources/subscribe endpoint.
Note: Hover and completion resources don't support subscriptions as they represent point-in-time queries.
Working with Resources vs. Tools
You can choose between two approaches for accessing LSP features:
Tool-based approach: Use the
get_diagnostics,get_info_on_location, andget_completionstools for a simple, direct way to fetch information.Resource-based approach: Use the
lsp-diagnostics://,lsp-hover://, andlsp-completions://resources for a more RESTful approach.
Both approaches provide the same data in the same format and enforce the same requirement that files must be opened first.
Troubleshooting
If the server fails to start, make sure the path to the LSP executable is correct
Check the log file (if configured) for detailed error messages
License
MIT License
Acknowledgments
@Tritlo/lsp-mcp for the original implementation
Chromaway for the Rell language and LSP server
Anthropic for the Model Context Protocol specification
Available Tools
9 toolsclose_documentA
Close a file in the LSP server. Use this tool when you're done with a file to free up resources and reduce memory usage. It's good practice to close files that are no longer being actively analyzed, especially in long-running sessions or when working with large codebases.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to close |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the resource-freeing behavior, which is helpful, but doesn't state what happens if the file isn't open or whether unsaved changes are affected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loaded with the core action, and every sentence adds value—purpose, usage context, and best practice. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool, the description adequately covers purpose and usage. It omits return value/error scenarios, but these are not critical for a straightforward close operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% coverage with a single parameter (file_path) and its description. The tool description adds no further semantic detail beyond the schema, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Close a file in the LSP server' with a specific verb and resource, distinguishing it from sibling tools like open_document and save_document.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit context for when to use the tool ('when you're done with a file to free up resources') and specific scenarios (long-running sessions, large codebases). It doesn't mention alternatives but the guidance is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_code_actionsA
Get code actions for a specific range in a file. Use this tool to obtain available refactorings, quick fixes, and other code modifications that can be applied to a selected code range. Examples include adding imports, fixing errors, or implementing interfaces. Requires the file to be opened first.
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | Yes | End line number | |
| file_path | Yes | Path to the file | |
| end_column | Yes | End column position | |
| start_line | Yes | Start line number | |
| language_id | Yes | The programming language the file is written in | |
| start_column | Yes | Start column position |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral transparency. It discloses the file-open prerequisite but fails to state whether the operation is read-only or whether it applies changes, nor does it describe the return format. This leaves ambiguity about the tool's side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences and stays focused. The first sentence defines the purpose, the second adds illustrative examples, and the third states a key prerequisite. It is concise without being overly terse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without an output schema, the description should explain what the tool returns. It mentions 'obtain available refactorings' but does not describe the response structure or possible error conditions. The prerequisite helps, but completeness is only moderate for a tool with six required parameters and no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all six parameters are individually documented in the schema. The description adds only the concept of a 'specific range', which aligns with the start/end line/column parameters, but provides no additional parameter semantics beyond what the schema already offers.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get code actions for a specific range in a file.' It provides a specific verb-resource pair and concrete examples (refactorings, quick fixes), distinguishing it from sibling tools like get_completions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this tool to obtain available refactorings, quick fixes, and other code modifications' and warns that the file must be opened first. It does not list exclusion criteria or alternatives, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_completionsA
Get completion suggestions at a specific location in a file. Use this tool to retrieve code completion options based on the current context, including variable names, function calls, object properties, and more. Helpful for code assistance and auto-completion at a particular location. Use this when determining which functions you have available in a given package, for example when changing libraries. Requires the file to be opened first.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number | |
| column | Yes | Column position | |
| file_path | Yes | Path to the file | |
| language_id | Yes | The programming language the file is written in |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description discloses an important behavioral constraint: the file must be opened first. It also clarifies that completions are context-based. However, it does not describe return format, error conditions, or whether an LSP server must be running, so it only partially covers transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is composed of five sentences but contains redundancy: sentences 1 and 2 both describe retrieving completions, and sentence 3 ('Helpful for...') adds little. The useful unique information (use case and prerequisite) could be expressed in fewer words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a completion tool, the description covers the core purpose, context, example use case, and a critical prerequisite (open file). It omits details about the return value or error handling, but given the simplicity and lack of output schema, it is reasonably complete for an agent to select and invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents all four parameters with 100% coverage, so the baseline is 3. The description indirectly references location and context but does not add specific parameter details beyond what the schema provides. The prerequisite about opening the file adds a bit of context for file_path.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the main function ('Get completion suggestions at a specific location in a file') and elaborates on the types of completions (variable names, function calls, object properties). This distinguishes it from siblings like get_diagnostics or get_code_actions, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit use cases ('when determining which functions you have available in a given package, for example when changing libraries') and a prerequisite ('Requires the file to be opened first'). However, it does not explicitly name alternative tools or say when not to use it, so it is not a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_diagnosticsA
Get diagnostic messages (errors, warnings) for files. Use this tool to identify problems in code files such as syntax errors, type mismatches, or other issues detected by the language server. When used without a file_path, returns diagnostics for all open files. Requires files to be opened first.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Path to the file to get diagnostics for. If not provided, returns diagnostics for all open files. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well by disclosing the default behavior when file_path is omitted (returns diagnostics for all open files) and the prerequisite that files be opened first. It doesn't describe the return format, but the read-only nature is implied by 'Get' and the description adds useful context beyond the bare tool name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two sentences that front-load the main action and then provide optional behavior and prerequisites. Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a single optional parameter and no output schema, the description adequately covers purpose, usage context, and key behavioral nuance (all open files). It could explicitly mention the output structure, but for a diagnostics tool the expected return is generally understood.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool description adds no new meaning beyond the input schema: the schema already states that file_path is optional and that omitting it returns diagnostics for all open files. Since schema coverage is 100%, and the description merely repeats the parameter's behavior, the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves diagnostic messages for files, using a specific verb ('Get') and identifying the resource (diagnostics for files). It distinguishes itself from sibling tools like get_completions or get_code_actions by focusing on errors, warnings, and language-server-detected issues.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this tool to identify problems in code files' and notes a prerequisite (files must be opened). It doesn't explicitly name exclusions or alternatives, but the clear scope provides sufficient guidance for when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_info_on_locationA
Get information on a specific location in a file via LSP hover. Use this tool to retrieve detailed type information, documentation, and other contextual details about symbols in your code. Particularly useful for understanding variable types, function signatures, and module documentation at a specific location in the code. Use this whenever you need to get a better idea on what a particular function is doing in that context. Requires the file to be opened first.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number | |
| column | Yes | Column position | |
| file_path | Yes | Path to the file | |
| language_id | Yes | The programming language the file is written in |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the prerequisite 'Requires the file to be opened first' and implies a read-only operation via 'get information' and 'LSP hover.' It does not explicitly state there are no side effects or describe error behavior, but the key requirement is covered, making it reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is somewhat verbose and redundant. Sentences 2 and 3 both mention retrieving type information and documentation, and sentence 4 repeats 'use this' guidance. It could be condensed to two or three clear sentences without losing meaning, so it does not earn full points for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only hover tool with four parameters, the description covers purpose, usage scenarios, and a key prerequisite. There is no output schema, so the description gives a general idea of the return content ('detailed type information, documentation...'). While more detail on return format or error handling would improve completeness, it is sufficient for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage for all four parameters, so the baseline is 3. The description does not add any parameter-specific details beyond the schema. It refers to 'a specific location' (line/column) and 'a file,' but these are already implied by the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Get information on a specific location in a file via LSP hover,' which is a specific verb+resource statement that clearly conveys the tool's function. It also distinguishes this from siblings like get_completions and get_code_actions by focusing on retrieving hover/type information rather than generating completions or actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context, stating it is 'particularly useful for understanding variable types, function signatures, and module documentation.' It also says 'Use this whenever you need to get a better idea on what a particular function is doing in that context.' However, it does not explicitly mention when not to use it or name alternative tools, so it misses the top score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_documentA
Open a file in the LSP server for analysis. Use this tool before performing operations like getting diagnostics, hover information, or completions for a file. The file remains open for continued analysis until explicitly closed
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to open | |
| language_id | Yes | The programming language the file is written in |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description shoulders the burden of behavioral disclosure. It does reveal a key behavioral trait—'The file remains open for continued analysis until explicitly closed'—which is useful. However, it omits other details such as error handling (e.g., if the file path does not exist) or whether reopening a file has any side effects, so the transparency is moderate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and every clause earns its place. It packs the core purpose, usage timing, and persistence behavior without redundancy or excessive detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description sufficiently covers the tool's role, use case, and lifecycle for a simple open operation. It does not detail return values, but there is no output schema and the tool likely returns nothing important. Given the simplicity and strong schema coverage, the only missing elements are edge-case behaviors, which do not heavily detract.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides descriptions for both parameters (file_path and language_id), covering 100% of parameters. The tool description adds no extra parameter-level detail beyond their purpose in the overall workflow, so the baseline score of 3 is appropriate given the schema's thorough coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Open a file in the LSP server') and its purpose ('for analysis'). It distinguishes from sibling tools like close_document and get_diagnostics by framing it as a prerequisite step, making its role unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'Use this tool before performing operations like getting diagnostics, hover information, or completions for a file,' providing direct guidance on when to invoke it. It also notes the file remains open until explicitly closed, implicitly suggesting the companion tool close_document for cleanup, though it does not name an explicit alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
restart_lsp_serverA
Restart the LSP server process. Use this tool to reset the LSP server if it becomes unresponsive, has stale data, or when you need to apply configuration changes. Can optionally reinitialize with a new root directory. Useful for troubleshooting language server issues or when switching projects.
| Name | Required | Description | Default |
|---|---|---|---|
| root_dir | No | The root directory for the LSP server. If not provided, the server will not be initialized automatically. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It mentions optional reinitialization with a new root directory and clarifies that the server won't auto-initialize if root_dir is omitted. However, it does not disclose side effects like loss of unsaved state, impact on open documents, or required permissions, which are important for a restart operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, with the core action in the first sentence. It is succinct, front-loaded, and contains no filler or redundant details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool without an output schema, the description covers the main purpose, common use cases, and parameter behavior. Minor gaps exist (e.g., side effects), but overall it provides enough context for an AI agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (root_dir is fully described in the schema). The description adds minor context by explaining that root_dir is optional and controls reinitialization, but it doesn't significantly go beyond the schema's own explanation. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Restart the LSP server process,' which clearly states the specific action and resource. It distinguishes this tool from siblings like start_lsp (initial startup) and get_diagnostics (inspection) by focusing on restarting an existing server.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly lists when to use the tool: 'if it becomes unresponsive, has stale data, or when you need to apply configuration changes' and 'when switching projects.' It provides clear context but does not explicitly mention alternatives or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_log_levelA
Set the server logging level. Use this tool to control the verbosity of logs generated by the LSP MCP server. Available levels from least to most verbose: emergency, alert, critical, error, warning, notice, info, debug. Increasing verbosity can help troubleshoot issues but may generate large amounts of output.
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | The logging level to set |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description discloses the effect on log output volume and its troubleshooting value. It does not cover persistence or broader side effects, but for a simple setter this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and resource, then adding the level list and warning. Every sentence contributes value; no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter tool with an enum and no output schema, the description fully covers the purpose, parameter semantics, and usage caveats. It is complete and self-contained.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Even though schema coverage is 100%, the description adds meaning by listing the levels in order of verbosity (emergency to debug), which clarifies the semantic ordering of the enum values and the practical impact of choosing a level.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool sets the server logging level and controls log verbosity. It uses a specific verb ('Set') and resource ('server logging level'), and is easily distinguished from siblings, which handle document/LSP operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use the tool (to control verbosity and troubleshoot issues) and includes a caveat that increasing verbosity may generate large output. It does not explicitly mention alternatives, but no sibling tool serves the same purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
start_lspA
Start the LSP server with a specified root directory. IMPORTANT: This tool must be called before using any other LSP functionality. The root directory should point to the project's base folder, which typically contains configuration files like tsconfig.json, package.json, or other language-specific project files. All file paths in other tool calls will be resolved relative to this root.
| Name | Required | Description | Default |
|---|---|---|---|
| root_dir | Yes | The root directory for the LSP server |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It discloses that the tool must precede all other LSP calls and that file paths resolve relative to the root. It does not cover failure modes or return values, but the critical behavioral traits are present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each serving a distinct purpose: what it does, when to call it, and how to set the parameter. No fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one param, no output schema), the description covers purpose, usage constraints, parameter semantics, and behavioral effects on other tools. It is complete for the intended use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only describes root_dir as 'The root directory for the LSP server'. The description enriches this with concrete examples (tsconfig.json, package.json) and explains path resolution implications, which is critical for correct usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Start' with a clear resource 'LSP server' and a required parameter 'root directory'. It clearly differentiates from sibling tools like get_completions or restart_lsp_server by establishing itself as the initialization step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states 'This tool must be called before using any other LSP functionality', providing an unambiguous usage condition. It also gives guidance on choosing the root directory with examples, making it clear when and how to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v0.2.0- First observed
close_document - First observed
get_code_actions - First observed
get_completions - First observed
get_diagnostics - First observed
get_info_on_location - First observed
open_document - First observed
restart_lsp_server - First observed
set_log_level - First observed
start_lsp
TDQS
Scored across 9 tools
Each tool targets a distinct LSP operation (hover, completion, code actions, diagnostics) or server/lifecycle management. There is no overlap in purpose, and descriptions clearly indicate the specific use case for each tool.
All tool names follow a consistent snake_case verb_noun pattern, with get_* for retrieval and start/restart/open/close/set for actions. The naming convention is uniform throughout the set.
9 tools is well-scoped for an LSP server, covering server lifecycle (start/restart/log level), document management (open/close), and core code intelligence operations (hover, completions, actions, diagnostics) without unnecessary redundancy.
The tool set covers the primary LSP interactions expected for code analysis and editing workflows, including hover, completions, code actions, and diagnostics. However, it lacks common LSP features such as go-to-definition, formatting, or workspace symbols, which are minor gaps for a general-purpose language server.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server to expose VS Code editing features to an LLM for AI coding9106 npm392MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that exposes Language Server Protocol features to external clients, allowing access to hover information, definitions, completions, references, and rename functionalities.9 npm40MIT
- AlicenseBqualityDmaintenanceMCP server for agentic interaction with the Lean theorem prover via LSP, providing tools for understanding, analyzing, and interacting with Lean projects.2121MIT
- FlicenseAqualityDmaintenanceAn MCP stdio server that wraps language servers to expose read-oriented code-intelligence tools (hover, definition, references, diagnostics, etc.) for coding agents, supporting TypeScript/JavaScript and Python.561-