Skip to main content
Glama
ProfessioneIT

lsp-mcp-server

lsp-mcp-server

An MCP (Model Context Protocol) server that bridges Claude Code to Language Server Protocol (LSP) servers, enabling semantic code intelligence capabilities.

Overview

lsp-mcp-server acts as a bridge between Claude Code and language servers, providing powerful code intelligence features:

  • Go to Definition - Navigate to where symbols are defined

  • Find References - Find all usages of a symbol across the workspace

  • Hover Information - Get type information and documentation

  • Code Completion - Get intelligent code suggestions

  • Diagnostics - Access errors, warnings, and hints from the language server

  • Symbol Search - Search for symbols in documents or across the workspace

  • Rename - Safely rename symbols across the entire codebase

  • Code Actions - Apply quick fixes, refactorings, and organize imports

  • Call Hierarchy - See who calls a function and what it calls

  • Type Hierarchy - Explore class inheritance and interface implementations

  • Format Document - Format code using the language server's formatter

  • Smart Search - Comprehensive symbol analysis in a single call

  • File Analysis - Explore imports, exports, and file relationships

┌─────────────┐      ┌──────────────────┐      ┌───────────────────┐
│ Claude Code │────▶│  lsp-mcp-server  │────▶│ Language Servers  │
│   (MCP)     │◀────│   (this tool)    │◀────│ (TypeScript, etc) │
└─────────────┘      └──────────────────┘      └───────────────────┘
      stdio              stdio/JSON-RPC            stdio

Related MCP server: Token Saver MCP

Features

  • 29 MCP Tools for comprehensive code intelligence

  • 10 Languages Supported out of the box:

    • TypeScript / JavaScript

    • Python

    • Rust

    • Go

    • C / C++

    • Ruby

    • PHP

    • Elixir

    • Kotlin

    • Java

  • Multi-root Workspace - Proper monorepo support with per-workspace server instances

  • Push-based Diagnostics - Real-time error/warning caching from language servers

  • Human-friendly Positions - All line/column numbers are 1-indexed

  • Safe Rename - Preview changes before applying with dry-run mode

  • Automatic Server Management - Servers start on-demand and restart on crash

  • Configurable - Customize language servers, timeouts, and more

  • Security Features - File size limits, workspace boundary validation, absolute path enforcement

Installation

Prerequisites

  • Node.js 18.0.0 or higher

  • Language servers for the languages you want to use:

# TypeScript/JavaScript
npm install -g typescript-language-server typescript

# Python
pip install python-lsp-server

# Rust
rustup component add rust-analyzer

# Go
go install golang.org/x/tools/gopls@latest

# C/C++
# Ubuntu/Debian:
sudo apt install clangd
# macOS:
brew install llvm

# Ruby
gem install solargraph

# PHP
npm install -g intelephense

# Elixir
mix escript.install hex elixir_ls
# Or download pre-built releases from:
# https://github.com/elixir-lsp/elixir-ls/releases

# Kotlin
# macOS:
brew install JetBrains/utils/kotlin-lsp
# Or download from:
# https://github.com/Kotlin/kotlin-lsp/releases

# Java (requires Java 20+, Maven, npm, protobuf)
git clone https://github.com/idelice/jls
cd jls && ./scripts/build.sh
# Add dist/ to PATH or symlink dist/lang_server_linux.sh as 'jls'

Install lsp-mcp-server

# Clone the repository
git clone <repository-url>
cd lsp-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Verify installation
node dist/index.js --help

Global Installation (Optional)

# Link globally for easy access
npm link

# Now you can run from anywhere
lsp-mcp-server

Configuration with Claude Code

1. Add to Claude Code MCP Settings

Create or edit the .mcp.json file in your home directory:

Location: ~/.mcp.json (user-level) or .mcp.json in your project root (project-level)

{
  "mcpServers": {
    "lsp": {
      "command": "node",
      "args": ["/absolute/path/to/lsp-mcp-server/dist/index.js"],
      "env": {
        "LSP_LOG_LEVEL": "info"
      }
    }
  }
}

Or if installed globally via npm link:

{
  "mcpServers": {
    "lsp": {
      "command": "lsp-mcp-server"
    }
  }
}

2. Restart Claude Code

After updating the configuration, restart Claude Code to load the new MCP server.

3. Verify Installation

In Claude Code, ask:

"Use lsp_server_status to check available language servers"

You should see a response showing the server is running.

To make Claude Code consistently prefer LSP tools over alternatives like Grep and Glob for code navigation, add instructions to your global ~/.claude/CLAUDE.md file:

## LSP Server - REQUIRED FIRST STEP

**BEFORE any code analysis, navigation, or codebase exploration, you MUST:**

1. Run `lsp_server_status` to check running servers
2. If the relevant language server is NOT running → run `lsp_start_server` immediately
3. ONLY AFTER the LSP server is running, proceed with analysis

This is a hard requirement, not a preference. Do NOT skip this step.

## LSP Tool Requirements

When LSP MCP tools are available, you MUST use them instead of alternatives:

| Task | REQUIRED Tool | FORBIDDEN Alternatives |
|------|---------------|----------------------|
| Find where X is defined | `lsp_goto_definition` | Grep, Read, Glob |
| Find where X is used | `lsp_find_references` | Grep |
| Find symbol by name | `lsp_workspace_symbols` or `lsp_find_symbol` | Glob, Grep |
| Understand file structure | `lsp_document_symbols` | Read entire file |
| Get type information | `lsp_hover` | Reading source code |
| Find implementations | `lsp_find_implementations` | Grep |
| Understand module API | `lsp_file_exports` | Read entire file |
| Check for errors | `lsp_diagnostics` | Running compiler manually |
| See file dependencies | `lsp_file_imports` or `lsp_related_files` | Grep for imports |

## Prohibited Patterns

When LSP is available, NEVER do these:

- NEVER use `Grep` to find function/class/symbol definitions
- NEVER use `Grep` to find where a symbol is referenced
- NEVER use `Glob` to find files containing a symbol name
- NEVER use `Read` to scan through a file looking for definitions
- NEVER use `Bash` with grep/rg/find for code navigation

These tools are still appropriate for:
- Searching for text/strings (not code symbols)
- Reading configuration files
- Reading documentation files
- File operations unrelated to code navigation

## LSP Tool Quick Reference

lsp_server_status # Check what's running lsp_start_server # Start a language server lsp_stop_server # Stop a language server lsp_goto_definition # Jump to where symbol is defined lsp_goto_type_definition # Jump to type definition lsp_find_references # Find all usages of a symbol lsp_find_implementations # Find concrete implementations lsp_workspace_symbols # Search symbols across project lsp_document_symbols # Get outline of a file lsp_document_highlights # Every occurrence in this file (read/write classified) lsp_hover # Get type/docs for symbol lsp_signature_help # Get function parameter hints lsp_inlay_hints # Inferred types + parameter names over a range lsp_completions # Get code completions lsp_diagnostics # Get errors/warnings for a file lsp_workspace_diagnostics # Get errors/warnings across opened files lsp_index_files # Warm up: batch-open files for workspace diagnostics lsp_file_exports # Get public API of a module lsp_file_imports # Get imports/dependencies of a file (regex, JS/TS) lsp_related_files # Find connected files (imports/imported by) lsp_folding_ranges # Foldable regions (functions, blocks, imports) lsp_selection_range # Semantic enclosing ranges (stmt/block/fn) lsp_rename # Rename symbol across codebase lsp_code_actions # Get/apply quick fixes and refactorings lsp_call_hierarchy # See callers and callees lsp_type_hierarchy # See type inheritance lsp_format_document # Format code lsp_smart_search # Combined: definition + refs + hover lsp_find_symbol # Find symbol by name (optionally scoped to a file)

This ensures Claude Code will:

  • Always start the LSP server before analyzing code

  • Use semantic LSP tools instead of text-based search for code navigation

  • Fall back to Grep/Glob only for non-code searches (strings, config files, docs)

This repository ships a SKILL.md — a self-contained, LLM-facing guide that teaches an assistant how to choose between the 29 lsp_* tools, what their gotchas are, and what canonical workflows look like. Installing it as a Claude Code skill lets the model load that guidance on demand instead of needing it pasted into every prompt.

Why install it in addition to the CLAUDE.md snippet above? The CLAUDE.md snippet enforces that LSP tools are used. SKILL.md teaches how to use them well — decision tree, workflows, gotchas, output shapes, error codes. The two complement each other.

Claude Code

Install at the user level (available in every project):

mkdir -p ~/.claude/skills/lsp-mcp-server
cp SKILL.md ~/.claude/skills/lsp-mcp-server/SKILL.md

Or at the project level (committed to a specific repo, available only inside it):

mkdir -p .claude/skills/lsp-mcp-server
cp /path/to/lsp-mcp-server/SKILL.md .claude/skills/lsp-mcp-server/SKILL.md

Restart Claude Code (or start a new session). The skill is auto-discovered from its YAML frontmatter (name: lsp-mcp-server). Claude will invoke it via the Skill tool whenever code navigation, refactoring, or diagnostics are relevant.

To verify, ask Claude Code:

"What skills do you have available for LSP?"

You should see lsp-mcp-server listed.

Other Claude / Anthropic SDK integrations

SKILL.md is plain Markdown with YAML frontmatter, so it works anywhere you can ship a Markdown document:

  • Anthropic API / Claude Agent SDK — load it via the Skills feature or include it in your system prompt.

  • Custom agents — copy the content into your agent's system prompt or knowledge base.

  • Other LLM CLIs (Gemini CLI, Copilot CLI, etc.) — drop it into whichever skill / instruction directory the client supports, or include it as reference context.

The file is intentionally self-contained: no external links to follow, no other files to install. One Markdown document is the whole skill.

Keeping it up to date

If you upgrade lsp-mcp-server (new tools, new behaviors), re-copy SKILL.md from the new version. A future release may break with a stale skill if, for example, a tool signature changes — pinning the skill to the server version you run is the simplest way to stay aligned.

Available Tools

Navigation Tools

lsp_goto_definition

Navigate to the definition of a symbol.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)

Output:
  - definitions: Array of locations with path, line, column, and context

Example prompt: "Go to the definition of the function at line 42, column 10 in /project/src/utils.ts"

lsp_goto_type_definition

Navigate to the type definition of a symbol (useful for finding the interface/class that defines a variable's type).

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)

Output:
  - definitions: Array of type definition locations

Example prompt: "Find the type definition for the variable at line 15, column 5 in /project/src/app.ts"

Reference Tools

lsp_find_references

Find all references to a symbol across the workspace.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - include_declaration: Whether to include the declaration (default: true)
  - limit: Maximum results (default: 100, max: 500)
  - offset: Skip results for pagination (default: 0)

Output:
  - references: Array of locations
  - total_count: Total number of references found
  - has_more: Whether there are more results

Example prompt: "Find all references to the 'UserService' class in /project/src/services/user.ts at line 5"

lsp_find_implementations

Find all implementations of an interface or abstract method.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - limit: Maximum results (default: 50, max: 100)

Output:
  - implementations: Array of implementation locations
  - total_count: Total implementations found
  - has_more: Whether there are more results

Example prompt: "Find all implementations of the interface at line 10 in /project/src/types.ts"

Information Tools

lsp_hover

Get hover information (type info, documentation) for a symbol.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)

Output:
  - contents: Markdown-formatted type information and documentation
  - range: The range of the hovered symbol (optional)

Example prompt: "What is the type of the variable at line 25, column 8 in /project/src/main.ts?"

lsp_signature_help

Get function/method signature information when inside a call expression.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)

Output:
  - signatures: Array of function signatures with parameters
  - active_signature: Index of the active signature
  - active_parameter: Index of the active parameter

Example prompt: "What are the parameters for the function call at line 30 in /project/src/api.ts?"

Symbol Tools

lsp_document_symbols

Get all symbols (functions, classes, variables, etc.) defined in a document.

Input:
  - file_path: Absolute path to the source file

Output:
  - symbols: Hierarchical array of symbols with name, kind, range, and children

Example prompt: "List all symbols in /project/src/components/Button.tsx"

lsp_workspace_symbols

Search for symbols across the entire workspace by name.

Input:
  - query: Search query (supports fuzzy matching)
  - kinds: Filter by symbol kinds (optional): Class, Function, Interface, Variable, etc.
  - limit: Maximum results (default: 50, max: 100)

Output:
  - symbols: Array of matching symbols with path and location
  - total_count: Total matches found
  - has_more: Whether there are more results

Example prompt: "Search for all classes containing 'Service' in the workspace"

lsp_find_symbol

Find a symbol by name and get comprehensive information about it - no file path needed.

Input:
  - name: Symbol name to search for (supports fuzzy matching)
  - kind: Filter to specific symbol kind (optional): Class, Function, Interface, etc.
  - include: Array of what to include: 'hover', 'definition', 'references', 'implementations', 'incoming_calls', 'outgoing_calls' (default: ['hover', 'definition', 'references'])
  - references_limit: Maximum references to return (default: 20)

Output:
  - query: The symbol that was searched for
  - match: The best matching symbol found
  - matches_found: Number of total matches
  - definition: Where the symbol is defined
  - hover: Type information and documentation
  - references: All usages of the symbol
  - implementations: Implementations (for interfaces)
  - incoming_calls: Functions that call this
  - outgoing_calls: Functions this calls

Example prompt: "Find the UserService class and show me all its references"

File Analysis Tools

lsp_file_exports

Get the public API surface of a file - all exported functions, classes, interfaces, and variables.

Input:
  - file_path: Absolute path to the source file
  - include_signatures: Include type signatures from hover (default: true, slower but more informative)

Output:
  - file: The file path
  - exports: Array of exported items with name, kind, line, column, and signature
  - note: Additional information

Example prompt: "What does /project/src/utils/index.ts export?"

lsp_file_imports

Get all imports and dependencies of a file.

Input:
  - file_path: Absolute path to the source file

Output:
  - file: The file path
  - imports: Array of imports with module, line, symbols, is_type_only, is_dynamic
  - note: Additional information

Example prompt: "What modules does /project/src/api/client.ts import?"

Find files connected to a given file - what it imports and what imports it.

Input:
  - file_path: Absolute path to the source file
  - relationship: Which relationships to include: 'imports', 'imported_by', or 'all' (default: 'all')

Output:
  - file: The file path
  - imports: Array of files this file imports
  - imported_by: Array of files that import this file
  - note: Additional information

Example prompt: "What files depend on /project/src/services/auth.ts?"

Diagnostic Tools

lsp_diagnostics

Get cached diagnostics (errors, warnings) for a file.

Input:
  - file_path: Absolute path to the source file
  - severity_filter: Filter by severity - 'all', 'error', 'warning', 'info', 'hint' (default: 'all')

Output:
  - diagnostics: Array of diagnostics with range, severity, message, and code
  - summary: Count of errors, warnings, info, and hints
  - note: Information about diagnostic caching

Example prompt: "Show me all errors in /project/src/index.ts"

lsp_workspace_diagnostics

Get diagnostics across all open files in the workspace.

Input:
  - severity_filter: Filter by severity - 'all', 'error', 'warning', 'info', 'hint' (default: 'all')
  - limit: Maximum diagnostics to return (default: 50, max: 200)
  - group_by: How to group results - 'file' or 'severity' (default: 'file')

Output:
  - items: Array of diagnostics with file, line, column, severity, message, and context
  - total_count: Total diagnostics found
  - returned_count: Number returned (may be limited)
  - files_affected: Number of files with diagnostics
  - summary: Count of errors, warnings, info, and hints
  - note: Information about diagnostic caching

Example prompt: "Show me all errors across the entire project"

Completion Tools

lsp_completions

Get code completion suggestions at a position.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - limit: Maximum suggestions (default: 20, max: 50)

Output:
  - completions: Array of completion items with label, kind, detail, and documentation
  - is_incomplete: Whether the list is incomplete

Example prompt: "What completions are available at line 15, column 10 in /project/src/app.ts?"

Refactoring Tools

lsp_rename

Rename a symbol across the workspace.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - new_name: The new name for the symbol
  - dry_run: Preview changes without applying (default: true)

Output:
  - changes: Map of file paths to arrays of edits
  - files_affected: Number of files that would be modified
  - edits_count: Total number of edits
  - applied: Whether changes were applied
  - original_name: The original symbol name (if available)

Example prompt: "Rename the function 'getUserData' to 'fetchUserData' at line 20 in /project/src/api.ts (dry run first)"

lsp_code_actions

Get available code actions (refactorings, quick fixes) at a position or range, and optionally apply them.

Input:
  - file_path: Absolute path to the source file
  - start_line: Start line number (1-indexed)
  - start_column: Start column number (1-indexed)
  - end_line: End line number (optional, defaults to start line)
  - end_column: End column number (optional, defaults to start column)
  - kinds: Filter by action kinds (optional): quickfix, refactor, refactor.extract, refactor.inline, source.organizeImports, etc.
  - apply: If true, apply the action at action_index (default: false)
  - action_index: Index of action to apply when apply=true (default: 0)

Output:
  - actions: Array of available code actions with title, kind, and edits
  - total_count: Number of available actions
  - applied: The action that was applied (if apply=true and successful)

Example prompt: "What refactoring options are available for the function at line 50 in /project/src/utils.ts?"

Example prompt: "Apply the first quick fix for the error at line 15 in /project/src/api.ts"

lsp_format_document

Format a document using the language server's formatting capabilities.

Input:
  - file_path: Absolute path to the source file
  - tab_size: Spaces per tab (default: 2)
  - insert_spaces: Use spaces instead of tabs (default: true)
  - apply: Apply formatting to file (default: false)

Output:
  - edits: Array of formatting edits with range and new_text
  - edits_count: Number of edits
  - applied: Whether edits were applied

Example prompt: "Format /project/src/messy-file.ts using the language server"

Hierarchy Tools

lsp_call_hierarchy

Get the call hierarchy for a function - who calls it and what it calls.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - direction: 'incoming' (callers), 'outgoing' (callees), or 'both' (default: 'both')

Output:
  - item: The call hierarchy item at the position
  - incoming_calls: Array of functions that call this function
  - outgoing_calls: Array of functions this function calls

Example prompt: "Show me all functions that call handleRequest at line 100 in /project/src/server.ts"

lsp_type_hierarchy

Get the type hierarchy for a class or interface - supertypes and subtypes.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - direction: 'supertypes' (parents), 'subtypes' (children), or 'both' (default: 'both')

Output:
  - item: The type hierarchy item at the position
  - supertypes: Array of parent types/interfaces
  - subtypes: Array of child types/implementations

Example prompt: "What classes implement the Repository interface at line 5 in /project/src/types.ts?"

Combined Tools

Comprehensive symbol search combining multiple LSP operations in one call.

Input:
  - file_path: Absolute path to the source file
  - line: Line number (1-indexed)
  - column: Column number (1-indexed)
  - include: Array of what to include: 'hover', 'definition', 'references', 'implementations', 'incoming_calls', 'outgoing_calls' (default: ['hover', 'definition', 'references'])
  - references_limit: Maximum references to return (default: 20)

Output:
  - symbol_name: Name of the symbol
  - hover: Type information and documentation
  - definition: Where the symbol is defined
  - references: All usages of the symbol
  - implementations: Implementations (for interfaces)
  - incoming_calls: Functions that call this
  - outgoing_calls: Functions this calls

Example prompt: "Give me a complete analysis of the processData function at line 75 in /project/src/processor.ts - definition, all references, and what calls it"

Server Management Tools

lsp_server_status

Get status of running language servers.

Input:
  - server_id: Specific server to check (optional, omit for all servers)

Output:
  - servers: Array of server status objects with id, status, capabilities, uptime, etc.

Example prompt: "Show the status of all language servers"

lsp_start_server

Manually start a language server for a specific workspace.

Input:
  - server_id: Server ID from configuration (e.g., 'typescript', 'python')
  - workspace_root: Absolute path to the workspace/project root

Output:
  - status: 'started'
  - server_id: The server that was started
  - workspace_root: The workspace root
  - capabilities: List of supported capabilities

Example prompt: "Start the TypeScript language server for /home/user/my-project"

lsp_stop_server

Stop a running language server.

Input:
  - server_id: Server ID to stop
  - workspace_root: Workspace root (optional, omit to stop all instances)

Output:
  - status: 'stopped'
  - server_id: The server that was stopped
  - was_running: Whether the server was actually running

Example prompt: "Stop the Python language server"

Supported Languages

The following languages are supported out of the box:

Language

Server

Command

File Extensions

Root Patterns

TypeScript/JavaScript

typescript-language-server

typescript-language-server --stdio

.ts, .tsx, .js, .jsx, .mjs, .cjs

tsconfig.json, jsconfig.json, package.json

Python

pylsp

pylsp

.py, .pyi

pyproject.toml, setup.py, requirements.txt, Pipfile

Rust

rust-analyzer

rust-analyzer

.rs

Cargo.toml

Go

gopls

gopls serve

.go

go.mod, go.work

C/C++

clangd

clangd --background-index

.c, .h, .cpp, .hpp, .cc, .cxx

compile_commands.json, CMakeLists.txt, Makefile

Ruby

solargraph

solargraph stdio

.rb, .rake, .gemspec

Gemfile, .ruby-version, Rakefile

PHP

intelephense

intelephense --stdio

.php, .phtml

composer.json, index.php

Elixir

elixir-ls

elixir-ls

.ex, .exs, .heex, .leex

mix.exs, .formatter.exs

Kotlin

kotlin-lsp

kotlin-lsp

.kt, .kts

build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts

Java

jls

jls

.java

pom.xml, build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, BUILD, .classpath

You can add additional languages by providing a custom configuration (see Configuration).

Configuration

Configuration File

Create a configuration file at one of these locations (in order of priority):

  1. ./.lsp-mcp.json (current directory)

  2. ./lsp-mcp.json (current directory)

  3. ~/.config/lsp-mcp/config.json (XDG config)

  4. ~/.lsp-mcp.json (home directory)

Or set LSP_CONFIG_PATH environment variable to specify a custom path.

Example configuration:

{
  "servers": [
    {
      "id": "typescript",
      "extensions": [".ts", ".tsx", ".js", ".jsx"],
      "languageIds": ["typescript", "typescriptreact", "javascript", "javascriptreact"],
      "command": "typescript-language-server",
      "args": ["--stdio"],
      "rootPatterns": ["tsconfig.json", "package.json"]
    },
    {
      "id": "python",
      "extensions": [".py"],
      "languageIds": ["python"],
      "command": "pylsp",
      "args": [],
      "rootPatterns": ["pyproject.toml", "setup.py", "requirements.txt"]
    }
  ],
  "requestTimeout": 30000,
  "autoStart": true,
  "logLevel": "info",
  "idleTimeout": 1800000
}

Configuration Options

Option

Type

Default

Description

servers

array

Built-in defaults

Language server configurations

requestTimeout

number

30000

Request timeout in milliseconds

autoStart

boolean

true

Auto-start servers on first request

logLevel

string

"info"

Log level: debug, info, warn, error

idleTimeout

number

1800000

Idle timeout before stopping servers (30 min)

Server Configuration

Each server in the servers array has:

Option

Type

Required

Description

id

string

Yes

Unique identifier for the server

extensions

string[]

Yes

File extensions this server handles

languageIds

string[]

Yes

LSP language identifiers

command

string

Yes

Command to start the server

args

string[]

Yes

Command arguments

env

object

No

Environment variables

initializationOptions

object

No

LSP initialization options

rootPatterns

string[]

No

Files/dirs that indicate project root

Environment Variables

Variable

Description

LSP_LOG_LEVEL

Override log level (debug, info, warn, error)

LSP_CONFIG_PATH

Path to configuration file

LSP_WORKSPACE_ROOT

Override workspace root detection

Security Features

lsp-mcp-server includes several security measures:

  • Absolute Path Enforcement - All file paths must be absolute to prevent path traversal attacks

  • Workspace Boundary Validation - File modifications (rename, format, code actions) are restricted to within the workspace root

  • File Size Limits - Files larger than 10 MB are rejected to prevent memory exhaustion

  • No Shell Execution - Language servers are spawned with shell: false to prevent command injection

Usage Examples with Claude Code

Basic Navigation

"I'm looking at /project/src/services/auth.ts. Can you tell me what the validateToken function at line 45 does? Use lsp_hover to get its documentation."

"Go to the definition of UserRepository used at line 23, column 15 in /project/src/controllers/user.ts"

Finding Usages

"Find all places where the handleError function is called in my codebase. It's defined at line 10 in /project/src/utils/error.ts"

"I want to refactor the Config interface. First, find all its implementations using lsp_find_implementations"

Code Quality

"Check /project/src/index.ts for any TypeScript errors using lsp_diagnostics"

"Show me all errors and warnings across the entire project using lsp_workspace_diagnostics"

Safe Refactoring

"I want to rename the getData function to fetchData. It's at line 50 in /project/src/api.ts. First do a dry run to see what would change."

"The dry run looks good. Now apply the rename by setting dry_run to false."

Code Exploration

"List all the symbols in /project/src/models/User.ts to understand its structure"

"Search the workspace for all classes that contain 'Controller' in their name"

"Find the UserService class and tell me everything about it - definition, references, and what calls it"

File Analysis

"What does /project/src/utils/index.ts export?"

"What files depend on /project/src/services/auth.ts? Use lsp_related_files"

"Show me all the imports in /project/src/api/client.ts"

Completions

"What methods are available on the object at line 30, column 5 in /project/src/app.ts? Use lsp_completions"

Code Actions and Refactoring

"What refactoring options are available for the code selection from line 20 to 35 in /project/src/utils.ts?"

"Organize imports in /project/src/components/App.tsx using lsp_code_actions with kinds filter for source.organizeImports"

"Apply the first quick fix for the error at line 15 in /project/src/api.ts"

Understanding Code Flow

"Show me the call hierarchy for the processOrder function at line 50 in /project/src/orders.ts - I want to see what calls it"

"What does the authenticate function call? Use lsp_call_hierarchy with outgoing direction"

"Show me the type hierarchy for the BaseRepository class - what are its subtypes?"

Comprehensive Analysis

"Give me a complete analysis of the UserService class at line 10 in /project/src/services/user.ts - I want definition, all references, implementations, and call hierarchy. Use lsp_smart_search"

Formatting

"Format /project/src/unformatted.ts using the language server (preview first, don't apply)"

Troubleshooting

Language Server Not Found

Error: Failed to start language server: typescript-language-server

Solution: Install the language server:

npm install -g typescript-language-server typescript

No Diagnostics Showing

Issue: lsp_diagnostics returns empty results

Explanation: Diagnostics are push-based. The language server sends them when files are opened or changed.

Solution:

  1. Open the file using another tool first

  2. Wait a moment for the server to analyze

  3. Try again

Server Crashes Repeatedly

Issue: Server keeps crashing and restarting

Solution:

  1. Check LSP_LOG_LEVEL=debug for detailed logs

  2. Verify the language server is properly installed

  3. Check if the workspace has valid configuration (e.g., tsconfig.json for TypeScript)

Position Errors

Issue: "Invalid position" errors

Remember: All positions are 1-indexed (first line is 1, first column is 1), not 0-indexed.

Path Errors

Issue: "File path must be absolute" errors

Remember: All file paths must be absolute (e.g., /home/user/project/src/file.ts, not src/file.ts).

Timeout Errors

Issue: Requests timing out

Solution: Increase the timeout:

export LSP_REQUEST_TIMEOUT=60000  # 60 seconds

Or in configuration:

{
  "requestTimeout": 60000
}

File Too Large

Issue: "File too large" errors

Explanation: Files larger than 10 MB are rejected to prevent memory issues.

Solution: Work with smaller files or split large files into modules.

Development

Building

npm run build        # Compile TypeScript
npm run dev          # Watch mode
npm run typecheck    # Type-check only

Testing

npm test             # Run unit tests
npm run test:watch   # Watch mode

Interactive Testing

Use the MCP Inspector for interactive testing:

npx @modelcontextprotocol/inspector node dist/index.js

Linting

npm run lint         # Check for issues
npm run lint:fix     # Auto-fix issues

Architecture

Multi-root Workspace Support

Server instances are keyed by (serverId, workspaceRoot) pairs. This means:

  • Each workspace gets its own language server instance

  • Monorepos work correctly with multiple tsconfig.json files

  • Server settings are isolated per workspace

Diagnostics Caching

Unlike other LSP features that are request-based, diagnostics are push-based:

  1. Language servers send publishDiagnostics notifications

  2. lsp-mcp-server caches these in memory

  3. lsp_diagnostics and lsp_workspace_diagnostics tools read from the cache

This means diagnostics are available immediately after files are opened, without an explicit request.

Automatic Server Lifecycle

  • Servers start automatically when needed (if autoStart: true)

  • Crashed servers restart with exponential backoff (max 3 attempts in 5 minutes)

  • Idle servers shut down after the configured timeout

Version

See package.json for the current version. The MCP server reports its version dynamically at startup, so it is always in sync with the package.

License

MIT

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting pull requests.

Available Tools

19 tools
lsp_call_hierarchyA
Read-onlyIdempotent

Get the call hierarchy for a function/method - who calls this function (incoming) and what functions this calls (outgoing). Essential for understanding code flow and impact analysis before refactoring.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
directionNoDirection of call hierarchy: incoming (callers), outgoing (callees), or bothboth

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and idempotentHint=true, covering safety and idempotency. The description adds valuable context beyond this by explaining the tool's purpose for 'code flow and impact analysis before refactoring,' which helps the agent understand its behavioral use case, though it doesn't detail rate limits or specific output formats.

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 appropriately sized and front-loaded, with two sentences that efficiently convey purpose and usage without waste. Every sentence adds value: the first defines the tool's function, and the second explains its importance, making it easy for an agent to parse quickly.

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?

Given the tool's moderate complexity, rich annotations, and 100% schema coverage, the description is mostly complete. It lacks details on output format or pagination, which is a minor gap since there's no output schema, but it sufficiently covers purpose and context for effective use by an agent.

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 description coverage is 100%, with clear documentation for all parameters including file_path, line, column, and direction with enum values. The description does not add any additional meaning beyond what the schema provides, such as explaining parameter interactions or edge cases, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Get the call hierarchy') and resources ('function/method'), distinguishing it from siblings like lsp_find_references or lsp_type_hierarchy by focusing on call relationships rather than references or type hierarchies. It explicitly mentions both incoming and outgoing directions.

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 clear context for usage ('Essential for understanding code flow and impact analysis before refactoring'), indicating when this tool is valuable. However, it does not explicitly state when not to use it or name specific alternatives among siblings, such as lsp_find_references for different analysis needs.

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

lsp_code_actionsA

Get available code actions (refactorings, quick fixes) at a position or range. Use for automated fixes, imports organization, and refactoring operations.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
start_lineYesStart line number (1-indexed)
start_columnYesStart column number (1-indexed)
end_lineNoEnd line number (1-indexed). Defaults to start line.
end_columnNoEnd column number (1-indexed). Defaults to start column.
kindsNoFilter by code action kinds: quickfix, refactor, refactor.extract, refactor.inline, refactor.rewrite, source, source.organizeImports, source.fixAll
applyNoIf true, apply the first available action. If false, just list available actions.
action_indexNoIndex of the action to apply (when apply=true). Defaults to 0 (first action).

TDQS

A4/5.0
Behavior3/5

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

Annotations provide readOnlyHint=false, openWorldHint=false, and idempotentHint=false, indicating this is a mutable, non-idempotent operation. The description adds useful context about what types of actions are available (refactorings, quick fixes) and their purposes, but doesn't elaborate on behavioral aspects like side effects, error conditions, or performance characteristics beyond what annotations already convey.

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?

Two sentences with zero waste. The first sentence states the purpose and core functionality, the second provides usage context. Every word earns its place with no redundancy or fluff.

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 tool with 8 parameters, no output schema, and annotations covering basic behavioral hints, the description provides good context about what code actions are and when to use them. However, it doesn't explain what the return format looks like or how to interpret the results, which would be helpful given the lack of output schema.

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?

With 100% schema description coverage, the input schema already documents all 8 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific verb 'Get' and resource 'available code actions' with explicit examples like 'refactorings, quick fixes'. It distinguishes from siblings by focusing on code actions rather than completions, diagnostics, or other LSP operations.

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 clear context for when to use this tool ('for automated fixes, imports organization, and refactoring operations'), but doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools.

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

lsp_completionsB
Read-onlyIdempotent

Get code completion suggestions at the given position.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
limitNoMaximum number of suggestions

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true (safe operation), openWorldHint=false (requires specific parameters), and idempotentHint=true (repeatable). The description adds minimal behavioral context beyond this - it implies this is a query operation but doesn't mention what kind of suggestions are returned, whether they're filtered by context, or any rate limits. No contradiction with annotations 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?

The description is perfectly concise - a single sentence that states exactly what the tool does without any wasted words. It's front-loaded with the core purpose and doesn't include unnecessary elaboration or examples that would dilute the message.

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 annotations provide good safety/behavioral information and the schema has 100% coverage, the description is minimally adequate. However, without an output schema, the description doesn't explain what 'suggestions' actually look like (completion items with labels/types/details), leaving the agent uncertain about the return format. For a tool with 4 parameters and no output schema, more context about the response would be helpful.

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?

With 100% schema description coverage, all parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema - it doesn't explain how the position parameters interact, what 'suggestions' actually contain, or how the limit parameter affects results. The baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Get code completion suggestions') and the resource ('at the given position'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'lsp_signature_help' or 'lsp_hover' which also provide language intelligence at positions, leaving some ambiguity about when to choose completions over other LSP features.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With 16 sibling LSP tools available, there's no mention of when completions are appropriate (e.g., during typing) versus when to use 'lsp_goto_definition' or 'lsp_find_references', nor any prerequisites like requiring the server to be started first.

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

lsp_diagnosticsA
Read-onlyIdempotent

Get cached diagnostics (errors, warnings) for a file. Diagnostics come from language server notifications.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
severity_filterNoFilter diagnostics by minimum severityall

TDQS

A4/5.0
Behavior4/5

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

Annotations provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, indicating safe, deterministic reads. The description adds valuable context beyond this: it specifies that diagnostics are 'cached' (implying they may not be real-time) and come from 'language server notifications' (clarifying the source). This enhances transparency without contradicting annotations.

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, front-loaded with the core purpose and followed by clarifying context. Every word earns its place, with no redundancy or unnecessary elaboration, 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.

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no output schema), annotations cover safety and determinism, and the description adds caching and source context. However, it lacks details on return format (e.g., structure of diagnostics) or error handling, leaving minor gaps for a tool without an output schema.

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 description coverage is 100%, with clear parameter documentation. The description adds minimal semantics beyond the schema, mentioning 'errors, warnings' which aligns with severity_filter but doesn't provide additional details like format or examples. Baseline 3 is appropriate since the schema already fully describes parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get cached diagnostics') and resource ('for a file'), specifying that diagnostics include errors and warnings from language server notifications. It distinguishes from siblings like lsp_code_actions or lsp_format_document by focusing on diagnostic retrieval rather than code fixes or formatting.

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?

The description implies usage for accessing diagnostics but doesn't explicitly state when to use this tool versus alternatives like lsp_hover or lsp_completions. It mentions diagnostics come from language server notifications, suggesting it's for post-analysis retrieval, but lacks clear exclusions or comparative guidance with sibling tools.

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

lsp_document_symbolsB
Read-onlyIdempotent

Get all symbols (functions, classes, variables, etc.) defined in a document.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already cover key behavioral traits: readOnlyHint=true (safe read), openWorldHint=false (limited scope), and idempotentHint=true (repeatable). The description adds minimal context by implying it returns all symbols from a single document, but doesn't disclose details like response format, pagination, or error handling. No contradiction with annotations.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and every part contributes to understanding what the tool does.

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 moderate complexity (LSP-based symbol retrieval), annotations provide good safety and idempotency info, but there's no output schema. The description is minimal and doesn't explain return values or error cases, leaving gaps for an agent to infer behavior.

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 description coverage is 100%, with the single parameter 'file_path' well-documented in the schema. The description doesn't add any meaning beyond the schema, such as file format requirements or path validation rules, so it meets the baseline for high schema coverage.

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 'Get' and resource 'all symbols (functions, classes, variables, etc.) defined in a document', which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'lsp_workspace_symbols' (which likely searches across multiple files), leaving some ambiguity about scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'lsp_workspace_symbols' for broader searches or 'lsp_goto_definition' for specific symbol navigation, nor does it specify prerequisites such as requiring an active LSP server.

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

lsp_find_implementationsB
Read-onlyIdempotent

Find all implementations of an interface or abstract method.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
limitNoMaximum number of results

TDQS

B3.3/5.0
Behavior3/5

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

Annotations provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, covering safety and idempotency. The description adds no behavioral context beyond this, such as performance characteristics, rate limits, or what 'implementations' entails (e.g., across workspace or project). It does not contradict annotations, but offers minimal extra value.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

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 (code analysis with positional parameters) and lack of output schema, the description is minimal but adequate with annotations covering key behavioral traits. However, it could benefit from more context on usage scenarios or result format to better guide an agent without output schema information.

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 description coverage is 100%, with clear documentation for all parameters (file_path, line, column, limit). The description does not add meaning beyond the schema, such as explaining how the tool uses the position parameters to identify the interface/method or default behavior for limit. Baseline 3 is appropriate given high schema coverage.

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 tool's purpose as 'Find all implementations of an interface or abstract method,' which is a specific verb+resource combination. However, it does not explicitly differentiate from siblings like 'lsp_goto_definition' or 'lsp_find_references,' which may have overlapping functionality in code navigation contexts.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It lacks context about prerequisites (e.g., requiring an active LSP server) or comparisons to sibling tools like 'lsp_type_hierarchy' or 'lsp_call_hierarchy,' which might serve similar purposes in different scenarios.

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

lsp_find_referencesA
Read-onlyIdempotent

Find all references to the symbol at the given position across the workspace.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
include_declarationNoWhether to include the declaration in results
limitNoMaximum number of results to return
offsetNoNumber of results to skip (for pagination)

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true. The description adds valuable context about workspace-wide scope and position-based targeting, which isn't covered by annotations. It doesn't contradict annotations (read-only operation aligns with 'find'), but could mention performance implications or result format.

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?

Single sentence, front-loaded with core purpose, zero wasted words. Every element ('find all references', 'to the symbol', 'at the given position', 'across the workspace') contributes essential information efficiently.

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 query tool with good annotations and full schema coverage, the description provides adequate context about what it does and scope. However, without an output schema, it doesn't describe result format (e.g., list of locations with metadata), which could help the agent interpret returns. Sibling context is partially addressed through implicit differentiation.

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 description coverage is 100%, so all parameters are documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides (e.g., it doesn't explain how position parameters interact or clarify workspace boundaries). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'find' and the resource 'references to the symbol', specifying the scope 'across the workspace' and the location constraint 'at the given position'. It distinguishes from siblings like lsp_goto_definition (single definition) and lsp_workspace_symbols (symbol search without position).

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?

The description implies usage when needing all references to a specific symbol, but doesn't explicitly state when to use alternatives like lsp_find_implementations (for interfaces) or lsp_smart_search (broader search). No exclusions or prerequisites are mentioned, leaving some ambiguity about tool selection.

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

lsp_format_documentA
Idempotent

Format a document using the language server's formatting capabilities. Respects project-specific formatting settings.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file to format
tab_sizeNoNumber of spaces per tab (default: 2)
insert_spacesNoUse spaces instead of tabs (default: true)
applyNoIf true, apply formatting changes to file. If false, return edits without applying.

TDQS

A3.7/5.0
Behavior4/5

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

Annotations provide readOnlyHint=false, idempotentHint=true, and openWorldHint=false, indicating this is a mutating but safe operation. The description adds valuable context about respecting project-specific formatting settings, which isn't covered by annotations. It doesn't contradict annotations, as 'format' implies mutation consistent with readOnlyHint=false.

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 concise sentences with zero wasted words. The first sentence states the core purpose, and the second adds important behavioral context. It's appropriately sized and front-loaded with essential information.

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 moderate complexity (formatting with project settings), rich annotations, and full schema coverage, the description is adequate but has gaps. It lacks output information (no schema provided), doesn't explain error conditions, and doesn't detail how 'apply' parameter affects behavior beyond the schema's basic description.

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?

With 100% schema description coverage, the input schema fully documents all parameters. The description adds no additional parameter semantics beyond what's in the schema, such as explaining how 'project-specific formatting settings' interact with parameters like tab_size. This meets the baseline score of 3 for high schema coverage.

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 action ('Format a document') and mechanism ('using the language server's formatting capabilities'), distinguishing it from other LSP tools that perform different operations like completions or diagnostics. However, it doesn't explicitly differentiate from hypothetical formatting alternatives beyond mentioning 'project-specific formatting settings.'

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?

The description implies usage context through 'Respects project-specific formatting settings,' suggesting this tool should be used when consistent project formatting is desired. However, it provides no explicit guidance on when to choose this tool versus other LSP tools or when not to use it (e.g., for non-source files).

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

lsp_goto_definitionA
Read-onlyIdempotent

Navigate to the definition of a symbol at the given position. Returns file path, line, and column of the definition.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true, openWorldHint=false, and idempotentHint=true, covering safety and idempotency. The description adds value by specifying the return format ('file path, line, and column of the definition'), which is not covered by annotations, though it lacks details on error handling or server requirements.

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 concise sentences with zero waste: the first states the purpose, and the second specifies the return values, making it front-loaded and efficiently structured.

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?

Given the tool's moderate complexity, rich annotations (readOnlyHint, idempotentHint), and full schema coverage, the description is mostly complete. However, it lacks output schema details (e.g., exact return structure) and does not address potential errors or server dependencies, leaving minor gaps.

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 description coverage is 100%, so the schema fully documents the parameters (file_path, line, column). The description does not add any additional meaning beyond what the schema provides, such as clarifying the symbol selection logic or position validation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Navigate to the definition') and resource ('symbol at the given position'), distinguishing it from siblings like lsp_goto_type_definition or lsp_find_references by focusing on symbol definitions rather than type definitions or references.

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?

The description implies usage for navigating to symbol definitions, but does not explicitly state when to use this tool versus alternatives like lsp_goto_type_definition or lsp_find_references, nor does it mention prerequisites such as needing an active LSP server.

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

lsp_goto_type_definitionA
Read-onlyIdempotent

Navigate to the type definition of a symbol. Useful for finding the class/interface that defines a variable's type.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, indicating a safe, deterministic read operation. The description adds value by explaining the tool's purpose (navigating to type definitions) and use case, but does not disclose additional behavioral traits like error handling, performance, or specific constraints beyond what annotations cover.

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, front-loaded with the core action and followed by a useful context sentence. Every word earns its place without redundancy, making it efficient and well-structured.

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?

Given the tool's moderate complexity (navigation with three parameters), rich annotations (read-only, deterministic), and no output schema, the description is mostly complete. It explains the tool's purpose and use case but could benefit from more explicit usage guidelines or behavioral details to fully compensate for the lack of output schema.

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 description coverage is 100%, with clear descriptions for file_path, line, and column. The description does not add meaning beyond the schema, as it focuses on tool purpose rather than parameter details. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Navigate to the type definition') and resource ('of a symbol'), distinguishing it from siblings like lsp_goto_definition (general definition) and lsp_find_implementations (implementations). It adds context about finding 'the class/interface that defines a variable's type,' making the purpose explicit and 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?

The description implies usage ('Useful for finding the class/interface that defines a variable's type') but does not explicitly state when to use this tool versus alternatives like lsp_goto_definition or lsp_find_implementations. It provides some context but lacks clear exclusions or named alternatives.

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

lsp_hoverA
Read-onlyIdempotent

Get hover information (type info, documentation) for the symbol at the given position.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, indicating a safe, deterministic read operation. The description adds value by specifying the type of information returned ('type info, documentation'), which isn't covered by annotations, but doesn't detail rate limits, auth needs, or output format. No contradiction with annotations.

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 a single, efficient sentence that front-loads the purpose ('Get hover information') and includes key details without waste. Every word contributes to understanding the tool's function.

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 moderate complexity (3 parameters, no output schema), the description is adequate but lacks details on return values, error handling, or dependencies on server status. Annotations cover safety, but without output schema, the description could better explain what 'hover information' entails.

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 description coverage is 100%, with clear descriptions for file_path, line, and column. The description adds minimal semantic context by linking parameters to 'given position' but doesn't provide additional details beyond what the schema already covers, such as format specifics or constraints.

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 'Get' and resource 'hover information' with specific content types ('type info, documentation') and target ('symbol at the given position'). It distinguishes from siblings like lsp_goto_definition or lsp_find_references by focusing on hover details rather than navigation or references, though it doesn't explicitly name alternatives.

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?

The description implies usage when hover information is needed for a symbol at a position, but it doesn't explicitly state when to use this tool versus alternatives like lsp_signature_help or lsp_completions, nor does it provide exclusions or prerequisites. Context is clear but lacks explicit guidance.

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

lsp_renameA
Idempotent

Rename a symbol across the workspace. By default performs a dry run showing changes without applying them.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
new_nameYesNew name for the symbol
dry_runNoIf true, only preview changes without applying. If false, apply changes to files.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false (mutation), idempotentHint=true (safe to retry), and destructiveHint=false (non-destructive). The description adds valuable context beyond this: it explains the dry-run default behavior (preview vs. apply changes), which isn't captured in annotations. It doesn't contradict annotations, as 'rename' aligns with readOnlyHint=false.

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, front-loaded with the core purpose and followed by a key behavioral detail (dry-run default). Every word earns its place, with no redundancy or fluff, 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.

Completeness4/5

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

Given the tool's complexity (mutation with workspace-wide impact), annotations cover safety aspects (idempotent, non-destructive), and the description adds crucial behavioral context (dry-run default). However, without an output schema, it doesn't describe return values (e.g., preview changes format), leaving a minor gap in completeness.

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 description coverage is 100%, with clear parameter descriptions in the input schema. The description adds minimal semantics beyond the schema, only implying that parameters like file_path, line, and column identify the symbol to rename. Since the schema does the heavy lifting, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('rename') and resource ('a symbol across the workspace'), specifying the scope of the operation. It distinguishes from siblings like lsp_find_references (which finds but doesn't rename) and lsp_document_symbols (which lists symbols).

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 clear context by mentioning 'across the workspace' and the dry-run default behavior, which helps understand when to use it. However, it doesn't explicitly state when to choose this over alternatives like lsp_code_actions (which might include rename) or when not to use it (e.g., for local vs. global renames).

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

lsp_server_statusA
Read-onlyIdempotent

Get status of running language servers.

ParametersJSON Schema
NameRequiredDescriptionDefault
server_idNoSpecific server ID to check, or omit for all servers

TDQS

A4/5.0
Behavior3/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, covering safety and idempotency. The description adds context about checking 'running' servers, which implies it may not work if servers are stopped, but it does not disclose additional behavioral traits like error handling, rate limits, or response format. With annotations covering key aspects, a 3 is appropriate as the description adds some value without contradictions.

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 a single, efficient sentence that front-loads the core purpose ('Get status of running language servers') with zero wasted words. It is appropriately sized for the tool's simplicity and earns its place by clearly stating the action and target.

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?

Given the tool's low complexity (1 optional parameter, no output schema) and rich annotations (readOnlyHint, idempotentHint), the description is mostly complete. It covers the purpose and implies scope ('running servers'), but could benefit from slight elaboration on output or error cases. However, with annotations handling safety and idempotency, it is sufficient for effective use.

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 description coverage is 100%, with the parameter 'server_id' fully documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, such as examples or usage nuances. Baseline 3 is correct when the schema handles all parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get status') and target resource ('running language servers'), distinguishing it from sibling tools that perform language server operations like completions, diagnostics, or server control (start/stop). It precisely communicates what the tool does without being vague or tautological.

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 implies usage for checking server status, which is clear in context, but it does not explicitly state when to use this tool versus alternatives (e.g., when to check status vs. using other LSP tools). It provides basic guidance but lacks explicit exclusions or named alternatives, keeping it at a 4.

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

lsp_signature_helpA
Read-onlyIdempotent

Get function/method signature information when inside a call expression.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, openWorldHint=false, and idempotentHint=true, covering safety and idempotency. The description adds valuable context by specifying that it retrieves signature information specifically for call expressions, which is not captured in annotations. However, it doesn't mention potential limitations like server availability or response format details.

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 a single, efficient sentence that front-loads the core purpose ('Get function/method signature information') and immediately specifies the usage context. There is no wasted verbiage, and every word contributes directly to understanding the tool's function.

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?

Given the annotations cover safety and idempotency, and the schema fully documents parameters, the description provides adequate context for a read-only diagnostic tool. However, without an output schema, it doesn't detail the return format (e.g., structured signature data), leaving a minor gap in completeness.

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 description coverage is 100%, with clear descriptions for file_path, line, and column parameters. The description doesn't add any additional semantic information beyond what the schema provides, such as explaining how these parameters pinpoint the call expression location. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get function/method signature information') and the precise context ('when inside a call expression'), distinguishing it from siblings like lsp_hover (general documentation) or lsp_completions (code suggestions). It uses concrete verbs and specifies the exact resource being retrieved.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'when inside a call expression.' This provides clear context for invocation and implicitly excludes usage in other scenarios (e.g., for general documentation or code navigation), helping differentiate it from alternatives like lsp_hover or lsp_goto_definition.

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

lsp_start_serverA
Idempotent

Manually start a language server for a specific workspace.

ParametersJSON Schema
NameRequiredDescriptionDefault
server_idYesServer ID from configuration (e.g., 'typescript', 'python')
workspace_rootYesAbsolute path to the workspace/project root

TDQS

A3.7/5.0
Behavior4/5

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

Annotations provide idempotentHint=true and readOnlyHint=false, indicating a non-destructive, repeatable operation. The description adds value by specifying 'Manually start,' which implies user-initiated action rather than automatic, and clarifies the target ('language server for a specific workspace'), enhancing context beyond annotations.

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 a single, efficient sentence that front-loads the core action and target. It wastes no words and is appropriately sized for the tool's complexity, earning full marks for conciseness.

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 moderate complexity (2 required parameters, no output schema), the description is adequate but minimal. It covers the basic purpose but lacks details on outcomes (e.g., what happens after starting, error conditions) or integration with siblings, leaving some gaps in completeness.

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 description coverage is 100%, with clear documentation for both parameters. The description doesn't add any additional meaning or examples beyond what the schema provides, such as explaining typical server IDs or workspace root formats, so it meets the baseline for high schema coverage.

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 action ('Manually start') and resource ('a language server for a specific workspace'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'lsp_server_status' or 'lsp_stop_server', which prevents 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 Guidelines3/5

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

The description implies usage when manual server initiation is needed, but lacks explicit guidance on when to use this tool versus alternatives (e.g., 'lsp_server_status' for checking status or 'lsp_stop_server' for stopping). No exclusions or prerequisites are mentioned, leaving usage context somewhat vague.

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

lsp_stop_serverA
Idempotent

Stop a running language server.

ParametersJSON Schema
NameRequiredDescriptionDefault
server_idYesServer ID from configuration (e.g., 'typescript', 'python')
workspace_rootNoWorkspace root to stop server for. If omitted, stops all instances of this server type.

TDQS

A4.2/5.0
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it specifies the tool stops a 'running' server, implying it only works on active instances. Annotations provide idempotentHint=true (safe to retry) and readOnlyHint=false (mutating), but the description clarifies the precondition and scope of the operation.

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 a single, focused sentence with zero wasted words. It's front-loaded with the core action and target, making it immediately understandable without unnecessary elaboration.

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 mutating tool with no output schema, the description adequately covers the purpose and basic behavior. However, it could benefit from mentioning potential side effects (e.g., stopping server terminates ongoing operations) or error conditions, though annotations help with idempotency context.

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?

With 100% schema description coverage, the input schema fully documents both parameters. The description doesn't add any parameter-specific details beyond what's in the schema, so it meets the baseline expectation without enhancing parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Stop') and target ('a running language server'), distinguishing it from all sibling tools which perform various LSP operations but not server lifecycle management. It precisely communicates the tool's function without ambiguity.

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 implies usage context (when a server is running), but doesn't explicitly state when to use it versus alternatives like lsp_server_status for checking status or lsp_start_server for starting. It provides clear operational intent but lacks explicit comparison with sibling tools.

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

lsp_type_hierarchyA
Read-onlyIdempotent

Get the type hierarchy for a class/interface - supertypes (parents, interfaces) and subtypes (children, implementations). Use for understanding inheritance and planning refactoring that affects class hierarchies.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
directionNoDirection of type hierarchy: supertypes (parents), subtypes (children), or bothboth

TDQS

A4/5.0
Behavior3/5

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

Annotations already provide key behavioral hints: readOnlyHint=true (safe read operation), openWorldHint=false (limited scope), and idempotentHint=true (repeatable). The description adds context about the tool's purpose (inheritance analysis) and use cases (refactoring planning), but does not disclose additional behavioral traits like performance characteristics, error conditions, or data format of the hierarchy output. With annotations covering safety and idempotency, the description adds moderate value.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second sentence adds usage context. Every sentence earns its place with no redundant or vague language, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (inheritance analysis), rich annotations (readOnlyHint, idempotentHint), and full schema coverage, the description is mostly complete. It covers purpose and usage well but lacks details on output format (no output schema provided) and potential limitations (e.g., language-specific constraints). This minor gap prevents a perfect score.

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 description coverage is 100%, so the input schema already fully documents all parameters (file_path, line, column, direction). The description does not add any parameter-specific semantics beyond what the schema provides, such as explaining how the hierarchy is derived from the source location or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Get the type hierarchy') and resources ('class/interface'), distinguishing it from siblings like lsp_find_implementations or lsp_goto_type_definition by focusing on inheritance relationships rather than single-direction lookups or definitions. It explicitly mentions what the hierarchy includes: 'supertypes (parents, interfaces) and subtypes (children, implementations).'

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 clear context for when to use the tool: 'for understanding inheritance and planning refactoring that affects class hierarchies.' However, it does not explicitly state when not to use it or name specific alternatives among siblings (e.g., lsp_find_implementations for subtypes only), which prevents a perfect score.

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

lsp_workspace_symbolsB
Read-onlyIdempotent

Search for symbols across the entire workspace by name.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to match symbol names (supports fuzzy matching)
kindsNoFilter results to specific symbol kinds (e.g., "Class", "Function", "Variable")
limitNoMaximum number of results

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already indicate read-only, non-open-world, and idempotent behavior. The description adds that it searches 'by name' and implies fuzzy matching (via the schema), but doesn't disclose additional traits like performance characteristics, error handling, or result format. It doesn't contradict annotations, so it meets the lower bar with some added context.

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 a single, efficient sentence that front-loads the core purpose ('Search for symbols') and key scope ('across the entire workspace'). There is no wasted verbiage, and every word contributes to understanding the tool's function.

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 moderate complexity (search with filtering), rich annotations (safety and behavior hints), and full schema coverage, the description is adequate but minimal. It lacks output details (no schema provided) and doesn't explain result structure or usage scenarios, making it complete enough for basic use but with gaps for optimal agent operation.

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 description coverage is 100%, so the schema fully documents parameters like 'query' (fuzzy matching), 'kinds' (filtering), and 'limit' (default 50). The description adds no extra parameter semantics beyond implying a name-based search, aligning with the baseline for high schema coverage.

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 action ('Search for symbols') and scope ('across the entire workspace by name'), which distinguishes it from sibling tools like lsp_document_symbols (likely limited to a single document). However, it doesn't explicitly contrast with all siblings (e.g., lsp_smart_search might also search symbols), making it very good but not perfect.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like lsp_document_symbols or lsp_smart_search. It mentions the scope ('entire workspace') but doesn't specify use cases, prerequisites, or exclusions, leaving the agent to infer context from tool names alone.

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. Dates show when Glama detected each change.

  1. 19 tool updatesv1.0.0
    • First observedlsp_call_hierarchy
    • First observedlsp_code_actions
    • First observedlsp_completions
    • First observedlsp_diagnostics
    • First observedlsp_document_symbols
    • First observedlsp_find_implementations
    • First observedlsp_find_references
    • First observedlsp_format_document
    • First observedlsp_goto_definition
    • First observedlsp_goto_type_definition
    • First observedlsp_hover
    • First observedlsp_rename
    • First observedlsp_server_status
    • First observedlsp_signature_help
    • First observedlsp_smart_search
    • First observedlsp_start_server
    • First observedlsp_stop_server
    • First observedlsp_type_hierarchy
    • First observedlsp_workspace_symbols

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes targeting specific LSP operations like definitions, references, or completions. However, lsp_smart_search overlaps with multiple individual tools (definition, references, implementations, type info, call hierarchy), which could cause confusion about when to use it versus the specialized tools. The descriptions help clarify, but the redundancy creates some ambiguity.

Naming Consistency5/5

All tools follow a consistent 'lsp_' prefix with snake_case naming, using clear verbs like 'get', 'find', 'goto', 'rename', etc. The pattern is predictable throughout, making it easy to understand each tool's function at a glance without stylistic deviations.

Tool Count4/5

With 19 tools, the count is on the higher side but reasonable for a comprehensive LSP server covering diagnostics, navigation, refactoring, and server management. It might feel slightly heavy, but each tool serves a distinct LSP feature, justifying its inclusion for a broad domain like language server protocol operations.

Completeness5/5

The tool set provides complete coverage for LSP interactions, including core operations (definition, references, completions, hover), advanced features (call/type hierarchy, implementations), refactoring (rename, code actions), diagnostics, formatting, and server management (start/stop/status). There are no obvious gaps, enabling agents to handle typical code analysis and editing workflows effectively.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Bridges Large Language Models with Language Server Protocol interfaces, allowing LLMs to access LSP's hover information, completions, diagnostics, and code actions for improved code suggestions.
    2,757
    123
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Bridges VSCode's Language Server Protocol with MCP to give AI assistants instant access to code intelligence, delivering 100-1000x faster responses with 90% fewer tokens than traditional text-based searching. Provides 17 production-ready tools for navigation, refactoring, diagnostics, and code analysis.
    35
    -
  • A
    license
    Not graded
    quality
    F
    maintenance
    Bridges the Model Context Protocol with Language Server Protocol to provide AI agents with persistent access to code intelligence features including navigation, diagnostics, refactoring, and completion across 7+ programming languages.
    2,757
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides LLM clients with structured code intelligence through LSP servers, enabling queries for definitions, references, call hierarchies, and more.
    2
    Apache 2.0

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/ProfessioneIT/lsp-mcp-server'

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