Skip to main content
Glama
SachieWang

java-jdtls-mcp-server

by SachieWang

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JDTLS_HOMEYesPath to JDT.LS installation root directory
JDTLS_JAVA_HOMENoDedicated JDK path for JDT.LS (overrides JAVA_HOME). Defaults to system JAVA_HOME.
JAVA_WORKSPACE_PATHNoRoot path of your Java project. Defaults to current working directory.
JDTLS_JAVA_RUNTIMESNoJSON list of Java Runtimes for different project versions
JDTLS_MAVEN_OFFLINENoEnable Maven offline mode (true/false). Defaults to false.
JDTLS_MAVEN_USER_SETTINGSNoPath to custom Maven user settings.xml
JDTLS_MAVEN_GLOBAL_SETTINGSNoPath to custom Maven global settings.xml

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
java_startA

Start the Java Language Server (JDT.LS). Required before other commands. If already running, it will restart.

java_restartB

Restart the Java Language Server (JDT.LS).

java_open_fileB

Notify the language server that a file is open (didOpen).

java_get_definitionB

Get definition location for a symbol.

java_get_referencesC

Get references for a symbol.

java_get_hoverB

Get hover information for a symbol.

java_get_diagnosticsA

Get diagnostics (errors/warnings) for a file. This tool now attempts to pull diagnostics actively from the server if supported (LSP 3.17+), otherwise falls back to cached results from asynchronous publishing.

java_get_workspace_diagnosticsA

Pull diagnostics for the entire workspace (LSP 3.17+). Note: This may not be supported by all language server versions.

java_load_maven_projectA

Load a Maven Java project into the language server workspace. This causes JDTLS to index the project, resolving dependencies and symbols across the entire project without needing to open files individually.

java_search_symbolsA

Search for symbols (classes, methods, fields) across the entire workspace by name.

java_get_file_symbolsB

Get all symbols (classes, methods, fields) defined in a specific file.

java_get_statusA

Get the current status of the Java Language Server.

configure_jdt_lsB

Dynamically update JDT.LS configuration (e.g. enable source downloading).

find_referencesA

Find references for a symbol. This is an enhanced version of java_get_references that marks external library results.

read_java_contentA

Read the content of a Java file, including local files and external library source code (jdt:// or jrt:// URIs).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have distinct purposes, but 'find_references' and 'java_get_references' are very similar and could cause confusion. 'java_get_diagnostics' and 'java_get_workspace_diagnostics' also overlap somewhat. Overall, descriptions help differentiate, but ambiguity exists.

Naming Consistency4/5

The majority of tools follow the 'java_verb_noun' pattern (12 out of 15). However, 'configure_jdt_ls', 'find_references', and 'read_java_content' deviate from this convention, breaking perfect consistency.

Tool Count5/5

15 tools is well-scoped for a Java language server integration. The set covers key operations like startup, diagnostics, symbol queries, references, and project loading without being overly large or trivial.

Completeness4/5

The tool set covers common LSP operations (hover, definition, references, diagnostics, symbols) and includes workspace-level diagnostics. Missing features like code completion, formatting, or rename, but the set is sufficient for typical agent interactions with JDT LS.

Maintenance

ActivityInactive
ResponsivenessNo issues