java-jdtls-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@java-jdtls-mcp-serverShow me the definition of the main method in App.java"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Java MCP Server & Gemini Extension
This project is a high-performance bridge between AI agents and Java codebases. It functions as both a Model Context Protocol (MCP) server and a Gemini CLI Extension, providing professional-grade Java language intelligence through Eclipse JDT.LS.
๐ Key Features
Gemini Extension & Agent Skills: Pre-packaged with structured Agent Skills for Navigation, Verification, and Lifecycle management, ensuring AI agents follow optimal workflows.
Native JDT.LS Launch: Directly spawns the Java Language Server via JVM for maximum stability and performance.
Enterprise-Grade Analysis: Supports loading entire Maven projects to resolve dependencies and symbols across the whole codebase.
Diagnostics Support: Real-time retrieval of compilation errors and warnings to help AI agents verify their code changes.
Environment & Instance Isolation: Uses workspace path hashing for isolated data directories and automatically clears conflicting environment variables (like
PORT) for reliable communication.Full LSP Capabilities: Supports Go to Definition, Find References, Hover documentation, Global Symbol Search, and Document Symbol extraction.
Related MCP server: JDTLS-MCP
๐ ๏ธ Prerequisites
Node.js: v18.0.0 or higher.
Java Development Kit (JDK): Java 17 or higher (Java 21+ recommended).
Eclipse JDT.LS: An installation of Eclipse JDT.LS.
๐ Installation & Setup
For Gemini CLI (Extension Mode)
This project is optimized for use as a Gemini CLI extension.
# Clone the repository
git clone <repository-url>
cd java-jdtls-mcp-server
npm install && npm run build
# Install as Gemini extension
gemini extensions install .For Claude Code / Other MCP Clients
For Claude Code, Claude Desktop, or other MCP clients, you'll need to configure the server explicitly as an MCP tool.
Build the project as shown above.
Edit your client's configuration file (e.g.,
claude_desktop_config.jsonfor Claude Desktop).Add the server configuration and define your global environment variables directly within the
envsection:
{
"mcpServers": {
"java-mcp-server": {
"command": "node",
"args": [
"/absolute/path/to/java-jdtls-mcp-server/dist/index.js"
],
"env": {
"JDTLS_HOME": "D:/software/jdt-language-server-latest",
"JDTLS_JAVA_HOME": "D:/software/java/jdk-23.0.1",
"JDTLS_JAVA_RUNTIMES": "[{\"name\":\"JavaSE-1.8\",\"path\":\"C:/Program Files/Java/jdk1.8.0_361\"},{\"name\":\"JavaSE-17\",\"path\":\"D:/software/jdk-17.0.7\"}]",
"JDTLS_MAVEN_USER_SETTINGS": "D:/software/apache-maven-3.9.3/conf/settings.xml",
"JDTLS_MAVEN_GLOBAL_SETTINGS": "D:/software/apache-maven-3.9.3/conf/settings.xml"
}
}
}
}Note: When using Claude Code, the project-level .env file logic (like JAVA_PROJECT=true) might not be loaded natively unless supported by the specific MCP client implementation. You may need to manage project-specific variables within the client's configuration directly.
1. Global Setup (User-level .env)
Global environment variables are recommended for common paths to avoid repeating them in every project. The global configuration file is typically located at: USER_HOME\.gemini\extensions\java-jdtls-mcp-server\.env (where USER_HOME is your user directory, e.g., C:\Users\User1).
How to Configure:
During Installation (Recommended): If you have enabled the
experimental.extensionConfigsetting in Gemini CLI, you will be prompted to input these environment variables during the initial installation. Gemini CLI will then auto-generate the.envfile at the path above.Manual Configuration: Alternatively, you can manually create the user-level
.envfile at this location and fill in the recommended information.
Recommended Configuration Example:
JDTLS_HOME=D:/software/jdt-language-server-latest
JDTLS_JAVA_HOME=D:/software/java/jdk-23.0.1
JAVA_WORKSPACE_PATH=
JDTLS_JAVA_RUNTIMES=[{"name":"JavaSE-1.8","path":"C:/Program Files/Java/jdk1.8.0_361"},{"name":"JavaSE-17","path":"D:/software/jdk-17.0.7"}]
JDTLS_MAVEN_USER_SETTINGS=D:/software/apache-maven-3.9.3/conf/settings.xml
JDTLS_MAVEN_GLOBAL_SETTINGS=D:/software/apache-maven-3.9.3/conf/settings.xmlVariable | Description | Required | Default |
| Path to JDT.LS installation root directory | Yes | - |
| Dedicated JDK path for JDT.LS (Overrides | No | System |
| Root path of your Java project | No | Current Working Directory |
| JSON list of Java Runtimes for different project versions | No | - |
| Path to custom Maven user | No | - |
| Path to custom Maven global | No | - |
| Enable Maven offline mode ( | No |
|
2. Project-Level Activation (Project-level .env)
Project-level env info is loaded and read by agent tools like Gemini CLI. For example, when using Gemini CLI, the project-level env path is usually: [Project Root]/.gemini/.env.
To prevent the Java language server from starting unnecessarily in non-Java projects, you must enable it explicitly per project. Please add the following to your project-level .env file:
# REQUIRED: Activates the Java Language Server for this specific workspace
JAVA_PROJECT=true(Optional) You can also place any of the global settings in this local .env file to override them for a specific project.
๐งฉ Expert Skills & AI Rules
This project provides a set of high-level Expert Skills (located in skills/) that guide AI agents on the most efficient ways to interact with the Java Language Server. These skills prevent common pitfalls (like redundant server restarts) and improve code intelligence accuracy.
Skill | Expert Guide | Key Benefit |
| Server management | Standardizes JDT.LS startup, status checks, and error recovery. |
| Code intelligence | Optimizes finding definitions, references, and symbols. |
| Project indexing | Speeds up Maven project loading without manual file scanning. |
| Diagnostics | Enforces real-time error checking and verification. |
๐ Usage in Gemini CLI
Gemini CLI can install these skills as part of the extension. Once installed, they are activated automatically or on-demand:
activate_skill java-lifecycleactivate_skill java-navigation
๐ค Usage in Claude Code / Other MCP Clients
While Claude Code doesn't support Gemini's extension packaging, it can still leverage these skills through its Rules system:
Project-Level Rules: Copy the contents (or relevant parts) of the
SKILL.mdfiles from theskills/directory into a.clauderulesfile in your Java project's root.Global Rules: Alternatively, you can add these instructions to your global Claude configuration.
By placing these rules in .clauderules, Claude Code will automatically adopt these "expert workflows" whenever it detects it is working within this project environment.
๐งฐ Available Tools
Tool Name | Description | Key Parameters |
| Initializes JDT.LS. Restarts if already running. |
|
| Forces a fresh restart of the JDT.LS process. |
|
| New! Loads an entire Maven project and indexes symbols. |
|
| New! Performs global symbol search across the workspace. |
|
| New! Extracts all symbols (classes/methods) from a file. |
|
| Notifies the server about file content (required for diagnostics). |
|
| Retrieves errors and warnings for a specific file. |
|
| Retrieves the definition location for a symbol. |
|
| Finds all references for a symbol. |
|
| Gets type info and documentation for a symbol. |
|
๐ง Agent Skills
The folder skills/ contains specialized Markdown files that guide AI agents on how to use these tools effectively:
Navigation: Strategies for exploring codebases and using symbol search.
Verification: Workflows for checking code correctness via diagnostics.
Lifecycle: Handling server initialization and auto-start configuration.
๐ Design Documentation
This project follows a structured design process. Detailed technical documents can be found in the design/ directory:
High-level Design: Describes the system architecture, core modules, and external interfaces.
Detailed Design: Covers class models, sequence diagrams, and internal implementation details of the
JavaLanguageServer.
๐ License
This project is licensed under the ISC License.
Available Tools
15 toolsconfigure_jdt_lsB
Dynamically update JDT.LS configuration (e.g. enable source downloading).
| Name | Required | Description | Default |
|---|---|---|---|
| settings | Yes | The settings object to send to the server |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'dynamically update' but does not disclose whether changes are persisted, require a restart, have side effects, or require specific permissions. This is a significant gap for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words, but it could be structured to highlight key points more clearly for an AI agent. Still, it is very concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple schema (one parameter, no output) and no annotations, the description provides the basic purpose but lacks details on error states, success indicators, or whether the update is atomic. It is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents the 'settings' parameter. The description adds no additional parameter meaning beyond the example 'enable source downloading', which is a hint but not a formal description. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (dynamically update) and the resource (JDT.LS configuration) with a concrete example (enable source downloading). It distinguishes from siblings, which are about file operations, diagnostics, and search, not configuration.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for runtime configuration updates, but it provides no explicit guidance on when to use it versus alternatives or prerequisites. Since no sibling tools deal with configuration, the context is acceptable but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_referencesA
Find references for a symbol. This is an enhanced version of java_get_references that marks external library results.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) | |
| line | Yes | Line number (0-indexed) | |
| character | Yes | Character offset (0-indexed) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only mentions that the tool marks external library results, but does not disclose other behavioral traits such as read-only nature, authentication needs, rate limits, or side effects. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose, and contains no unnecessary words. It earns its place efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and three required parameters, the description is too minimal. It does not explain what 'marks external library results' means in practice, nor does it cover return format or error conditions. For an enhanced version of a sibling tool, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (all three parameters have descriptions). The description adds no extra meaning beyond the schema; it does not elaborate on the parameters. Baseline score of 3 is appropriate as the schema already provides necessary detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it finds references for a symbol and distinguishes itself from the sibling 'java_get_references' by noting it marks external library results. The verb 'find' and resource 'references' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description positions this tool as an enhanced version of java_get_references, implying it should be used when external library marking is needed. However, it does not explicitly state when not to use it or list alternatives, so it lacks full exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_definitionB
Get definition location for a symbol.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) | |
| line | Yes | Line number (0-indexed) | |
| character | Yes | Character offset (0-indexed) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must cover behavioral traits, but it only states the basic purpose. It does not disclose what happens when a symbol is not found, whether the file must be open, or any side effects. The description is minimally transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise, but it provides only minimal information. It could be expanded to include more context without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, yet the description does not explain return values, error conditions, or how the tool responds. It is incomplete for agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds no extra meaning beyond the schema. Baseline 3 is appropriate as the schema already documents all parameters adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a clear verb-resource structure: 'Get definition location for a symbol'. It is specific and distinct from sibling tools like 'find_references' or 'java_get_hover'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives or any prerequisites. Siblings like 'find_references' and 'java_get_hover' exist, but the description does not differentiate usage contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden and adds behavioral context such as attempting active pull from server (LSP 3.17+), and fallback to cached results. This discloses version dependency and behavior variation, which is valuable beyond the tool's basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no fluff, front-loaded with the core purpose. Every word earns its place, efficiently conveying the behavior and fallback.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema or annotations, the description covers the key behavioral aspects (active vs. cached) and version dependency. It is sufficiently complete for the agent to use correctly, though mentioning the return format (list of diagnostics) could improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and already describes the parameter (filePath) as absolute path or URI. The description adds no extra meaning beyond the schema, so baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get diagnostics (errors/warnings) for a file', using a specific verb ('Get') and resource ('diagnostics'), and scopes it to a single file. This distinguishes it from the sibling tool 'java_get_workspace_diagnostics' which targets workspace-level diagnostics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context on behavior (active pull vs. cached) but does not explicitly state when to use this tool versus alternatives like 'java_get_workspace_diagnostics'. Usage guidance is implied but not formalized.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_file_symbolsB
Get all symbols (classes, methods, fields) defined in a specific file.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the Java file or a URI (e.g. jdt://...) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description only states it retrieves symbols. It does not disclose performance implications, whether results are complete, or if it requires file system access. Minimal disclosure for a read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no filler, highly efficient for the content it conveys.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is minimal and lacks details about return format, nested symbols, or how it differs from java_open_file. It does not provide enough context for an agent to decide between similar tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (one parameter fully described). The description adds no extra meaning beyond the parameter's own description, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets symbols (classes, methods, fields) from a specific file, distinguishing it from sibling tools like java_search_symbols which search across the workspace.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like java_search_symbols or java_get_definition. The description implies file-specific use but doesn't set boundaries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_hoverB
Get hover information for a symbol.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) | |
| line | Yes | Line number (0-indexed) | |
| character | Yes | Character offset (0-indexed) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits such as side effects, prerequisites, or limitations. It only states the action without additional context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is concise and front-loaded. Every word is necessary and there is no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description does not explain what the hover information contains or any return structure. For a tool with three parameters and no output schema, the description should provide more context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% as all three parameters have descriptions. The tool description itself does not add further meaning beyond the schema, meeting the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Get' and resource 'hover information' for a 'symbol'. It clearly distinguishes from sibling tools like java_get_definition or java_get_references, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when hover information is needed, but it does not provide explicit guidance on when to use this tool versus alternatives like java_get_definition or java_get_references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_referencesC
Get references for a symbol.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) | |
| line | Yes | Line number (0-indexed) | |
| character | Yes | Character offset (0-indexed) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only says 'Get references' without disclosing read-only nature, error behavior, or effect. Very minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise (one sentence) and to the point, but lacks structure or additional details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Simple tool but description lacks explanation of return value or what 'references' means. Incomplete for a new user despite full schema coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description does not add any additional meaning beyond the schema's parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Get references for a symbol' but is vague; does not specify what kind of symbol or distinguish from sibling 'find_references'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives like 'find_references'. No prerequisites or context provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_statusA
Get the current status of the Java Language Server.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It implies a read-only, nondestructive operation, which is clear. However, it does not detail what the status output contains or if there are any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no extraneous words. It could potentially add more detail, but for the simplicity of the tool, it is appropriately sized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters, no output schema, and a simple purpose, the description is adequate. It tells the agent what the tool does. However, it lacks details on the output format or contents of the status.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema coverage is 100% (empty schema). According to guidelines, baseline is 4. The description does not need to add parameter info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the current status of the Java Language Server', using a specific verb ('Get') and resource ('current status'). It distinguishes from siblings like java_start or java_restart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. For example, it doesn't suggest checking status after starting the language server or before other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_get_workspace_diagnosticsA
Pull diagnostics for the entire workspace (LSP 3.17+). Note: This may not be supported by all language server versions.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It does not state whether the operation is read-only, if it can be expensive, or if it may cause side effects. The implication is a read operation, but this is not explicitly confirmed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first immediately conveys the purpose, and the second adds a relevant caveat. No unnecessary words or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides the core purpose and a limitation but does not describe the return value or format. Since there is no output schema, the description should hint at what diagnostics look like (e.g., list of issues per file). For a zero-parameter tool, this is a moderate gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the input schema is fully covered (100%). Per guidelines, this gives a baseline of 4. No additional parameter details are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool pulls diagnostics for the entire workspace, specifying the LSP version. The verb 'pull' and resource 'diagnostics for the entire workspace' are specific, and it distinguishes from sibling tools like java_get_diagnostics which likely target a single file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The only guidance is a note about potential lack of support across language server versions. No explicit instructions on when to use this tool vs alternatives (e.g., java_get_diagnostics for file-level diagnostics), nor when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the root of the Maven project (containing pom.xml) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes indexing and resolution but omits details like blocking behavior, idempotency, or error handling. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action, no wasted words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the context of sibling tools, the description is sufficiently complete. It explains the main effect and purpose, though it could mention prerequisites or return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear schema description for projectPath. The tool description adds no new parameter meaning beyond what is in the schema, so baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Load a Maven Java project into the language server workspace,' with specific verb and resource. It explains the indexing and resolution effects, distinguishing it from file-level sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is for whole-project operations by mentioning 'without needing to open files individually,' but lacks explicit comparison to siblings or prerequisites. Could be improved by stating when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_open_fileB
Notify the language server that a file is open (didOpen).
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file or a URI (e.g. jdt://...) | |
| content | Yes | Content of the file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only states the action but does not disclose side effects (e.g., starting diagnostics, caching), error conditions, or prerequisites. Since no annotations are provided, the description should cover these.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no redundant information. Efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple but the description lacks context about return value (none specified) and behavior. Given no output schema, some explanation of what happens after the notification would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already describes both parameters with good coverage. The description adds no additional information about how to use the parameters, so scores baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (notify) and the resource (language server that a file is open), with the specific LSP event (didOpen). It distinguishes from sibling tools which are mostly retrieval or analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus others. For example, it does not mention that it should be called before other queries, or that it is not needed if file is already open.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_restartB
Restart the Java Language Server (JDT.LS).
| Name | Required | Description | Default |
|---|---|---|---|
| jdtlsHome | Yes | Path to JDT.LS installation root directory | |
| workspacePath | No | Path to the workspace root (default: current directory) | |
| javaHome | No | Path to Java Home (overrides JAVA_HOME env var) | |
| javaRuntimes | No | List of Java Runtimes for different versions | |
| mavenConfig | No | Custom Maven configuration |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior. It only says 'Restart', but does not explain what restart entails (e.g., stopping the server, impact on open files, diagnostics, or configuration reload). No side effects or permissions are mentioned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, which is concise and front-loaded. However, it could be slightly more informative without being verbose, so a 4 is appropriate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (5 parameters, nested objects, no output schema, no annotations), the description is incomplete. It lacks information on return values, prerequisites, side effects, or how the restart interacts with sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all parameters have descriptions in the schema. The description adds no additional meaning beyond the schema, hence baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Restart' and the resource 'Java Language Server (JDT.LS)', distinguishing it from siblings like java_start (which starts) and configure_jdt_ls (which configures). The purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., java_start, configure_jdt_ls). It does not specify prerequisites, such as whether the server must already be running, or context for restart (e.g., after configuration changes).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_search_symbolsA
Search for symbols (classes, methods, fields) across the entire workspace by name.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The symbol name to search for (e.g., 'UserService') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only states the action 'search' without disclosing behavioral traits like whether it is read-only, what exactly is returned, or any restrictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with verb and resource, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers basic purpose and scope but lacks information about return format or output, which would be helpful given no output schema. Adequate for a simple search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema describes parameter as string but description adds context with example 'UserService' and clarifies it is a symbol name, adding value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'Search', resource 'symbols', scope 'entire workspace', and lists symbol types (classes, methods, fields). Distinguishes from sibling tools like find_references and java_get_file_symbols.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Specifies when to use: to search for symbols by name across workspace. Implicitly distinguishes from references or file-specific searches, but lacks explicit when-not or alternative comparisons.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
java_startA
Start the Java Language Server (JDT.LS). Required before other commands. If already running, it will restart.
| Name | Required | Description | Default |
|---|---|---|---|
| jdtlsHome | Yes | Path to JDT.LS installation root directory | |
| workspacePath | No | Path to the workspace root (default: current directory) | |
| javaHome | No | Path to Java Home (overrides JAVA_HOME env var) | |
| javaRuntimes | No | List of Java Runtimes for different versions | |
| mavenConfig | No | Custom Maven configuration |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that it starts the server and restarts if already running, but no annotations are provided to cover safety/permissions; lacks detail on failure modes or environment requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loads the action and key behavior, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Misses return value description or outcome indication; given there is no output schema, description should hint at what happens after call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% so baseline is 3; description does not add any additional parameter context beyond what schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool starts the Java Language Server, distinguishes it from other commands by noting it is required first, and mentions restart behavior.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States 'Required before other commands', which provides context, but does not differentiate from sibling 'java_restart' which also restarts, leaving ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_java_contentA
Read the content of a Java file, including local files and external library source code (jdt:// or jrt:// URIs).
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | The URI or file path to read |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses capability to read external library source code via specific URI schemes, which is additional context. However, it doesn't mention error handling, size limits, or side effects; for a read tool this is acceptable but could be improved.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with clear verb ('Read'), resource ('Java file'), and scope ('including local files and external library source code'). No redundancy, front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one parameter and no output schema, the description is adequate. It covers supported URI schemes. Missing explicit statement about return value (likely file content), but inferred from purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter. The description 'URI or file path to read' adds no extra meaning beyond the schema's description. The global description mentions URI types, but param-specific enhancement is minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it reads content of Java files, specifying local files and external library source code via jdt:// or jrt:// URIs. This distinguishes it from generic file readers and sibling tools like java_get_hover.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for reading Java file content but lacks explicit guidance on when to use this tool over alternatives like java_get_hover or java_get_references. No when-not-to-use or alternatives listed.
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.
15 tool updates
v1.0.0- First observed
configure_jdt_ls - First observed
find_references - First observed
java_get_definition - First observed
java_get_diagnostics - First observed
java_get_file_symbols - First observed
java_get_hover - First observed
java_get_references - First observed
java_get_status - First observed
java_get_workspace_diagnostics - First observed
java_load_maven_project - First observed
java_open_file - First observed
java_restart - First observed
java_search_symbols - First observed
java_start - First observed
read_java_content
TDQS
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.
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.
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.
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
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
An MCP server that gives your AI access to the source code and docs of all public github repos
Official MCP server for Agentwork โ delegate tasks to AI agents with human-in-the-loop
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
A MCP server built for developers enabling Git based project management with project and personalโฆ
Related MCP Servers
- AlicenseBqualityDmaintenanceA lightweight MCP server that enables AI agents to perform deep codebase analysis by leveraging Gemini's massive context window for cross-file analysis and intelligent file selection.429MIT
- AlicenseNot gradedqualityBmaintenanceExposes Eclipse JDT Language Server to AI agents via MCP. Embedded OSGi architecture runs jdtls in the same JVM โ no subprocess, no network hop. Tools: hover, definition, references, completion, diagnostics, document & workspace symbols.4Eclipse Public 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.764Apache 2.0
- AlicenseBqualityBmaintenanceA high-performance MCP server for intelligent documentation search, proactive bug detection, and semantic analysis of codebases.2515MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/SachieWang/java-jdtls-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server