Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| JAVA_HOME | No | Java 21+ installation | Auto-detect |
| JDTLS_HOME | No | JDT.LS installation directory | Auto-detect |
| JONS_MCP_JAVA_WORKSPACE | No | Root workspace for Java projects | Current directory |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| definition | Navigate to the definition of a symbol at the given position. Args: file_path: Absolute path to the Java file line: 0-indexed line number character: 0-indexed character position Returns: Dictionary with 'locations' array or 'status'/'message' if initializing |
| references | Find all references to the symbol at the given position. Args: file_path: Absolute path to the Java file line: 0-indexed line number character: 0-indexed character position include_declaration: Whether to include the declaration in results Returns: Dictionary with 'locations' array or 'status'/'message' if initializing |
| implementation | Find implementations of an interface or abstract method. Args: file_path: Absolute path to the Java file line: 0-indexed line number character: 0-indexed character position Returns: Dictionary with 'locations' array or 'status'/'message' if initializing |
| type_definition | Navigate to the type definition of a symbol at the given position. Args: file_path: Absolute path to the Java file line: 0-indexed line number character: 0-indexed character position Returns: Dictionary with 'locations' array or 'status'/'message' if initializing |
| document_symbols | Get all symbols defined in a Java file. Args: file_path: Absolute path to the Java file Returns: Dictionary with 'symbols' array or 'status'/'message' if initializing |
| workspace_symbols | Search for symbols in the workspace. Args: query: Search query string (symbol name or pattern) file_path: Optional file path to determine which project to search Returns: Dictionary with 'symbols' array or 'status'/'message' if initializing |
| diagnostics | Get diagnostics (errors, warnings) for a file or all files. Args: file_path: Optional path to get diagnostics for a specific file. If not provided, returns diagnostics for all files. Returns: Dictionary with 'diagnostics' array containing formatted diagnostic info |
| hover | Get hover information (Javadoc, type info) for a symbol at the given position. Args: file_path: Absolute path to the Java file line: 0-indexed line number character: 0-indexed character position Returns: Dictionary with 'content' (markdown) or 'status'/'message' if initializing |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |