Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JAVA_HOMENoJava 21+ installationAuto-detect
JDTLS_HOMENoJDT.LS installation directoryAuto-detect
JONS_MCP_JAVA_WORKSPACENoRoot workspace for Java projectsCurrent directory

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/jonmmease/jons-mcp-java'

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