MCP tools
jdx mcp serves 27 typed tools over the Model Context Protocol (stdio). This list is what the server itself answers to tools/list in the current build.
jdx — an IDE for AI agents: Java/Kotlin structure, sources, usages and call graphs, one precise question per tool. Every answer carries provenance; ambiguous refs list candidates instead of guessing.
jdx_show#
Go to declaration: the class card for a type (kind, supertypes, source, provenance).
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
jdx_members#
List the members of a type — the '.' completion equivalent. Inherited members are included by default, grouped by declaring type.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
kind | string | Member kind to list: method, field, ctor, property or all (default all). |
access | string | Visibility to list: public, protected, package, private or all (default: public + protected). |
static | boolean | Only static members (mutually exclusive with instance). |
instance | boolean | Only instance members (mutually exclusive with static). |
from | string | Only members inherited from this supertype. |
grep | string | Only members whose name matches this regex. |
includeSynthetic | boolean | Include bridge/synthetic members, hidden by default. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
withDoc | boolean | Include the first javadoc sentence per member. |
sort | string | Row order: kind (the default), name (flat name-first) or declaring. |
view | string | Declaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection). |
declared | boolean | Only members declared on this exact type (overrides the inherited default). |
jdx_outline#
File Structure: one dense line per member declared on a type (never inherited).
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
kind | string | Member kind to list: method, field, ctor, property or all (default all). |
access | string | Visibility to list: public, protected, package, private or all (default: public + protected). |
static | boolean | Only static members (mutually exclusive with instance). |
instance | boolean | Only instance members (mutually exclusive with static). |
from | string | Only members inherited from this supertype. |
grep | string | Only members whose name matches this regex. |
includeSynthetic | boolean | Include bridge/synthetic members, hidden by default. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
withDoc | boolean | Include the first javadoc sentence per member. |
sort | string | Row order: kind (the default), name (flat name-first) or declaring. |
view | string | Declaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection). |
jdx_body#
Open the method: the source body of one member, sliced verbatim with provenance.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
context | integer | Extra lines around the body (default 0). |
lineNumbers | boolean | Prefix every line with its 1-based number. |
maxLines | integer | Cap the body slice (default 200). |
withSignature | boolean | Prepend the member signature line. |
withDoc | boolean | Append the member javadoc. |
engine | string | Force a reconstruction engine: vineflower or javap (default: paired sources first). |
jdx_source#
Open the file: whole source for a type, or a slice of it, with provenance.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
lines | string | Line window A:B (1-based, inclusive). |
around | string | Center the slice on this member ref. |
context | integer | Extra lines around the slice (default 0). |
lineNumbers | boolean | Prefix every line with its 1-based number. |
maxLines | integer | Cap the slice (default 200). |
engine | string | Force a reconstruction engine: vineflower or javap (default: paired sources first). |
jdx_signature#
Parameter info: one signature line per overload, with real parameter names.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
includeSynthetic | boolean | Include bridge/synthetic members, hidden by default. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
view | string | Declaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection). |
jdx_doc#
Quick documentation for a type or member, falling back to the nearest documenting supertype like IntelliJ quick-doc.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
inherited | boolean | Allow the supertype fallback (the default; accepted for explicitness). |
no-inherited | boolean | Only docs written on this exact symbol (mutually exclusive with inherited). |
raw | boolean | Raw javadoc text instead of the rendered form. |
maxLines | integer | Cap the doc text (default 200). |
jdx_search#
Search symbols by glob, regex or fuzzy name. Default kind=all covers types, packages and modules; pass kind=method|field to scan members. A default-kind miss hints at --kind method.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
kind | string | Symbol kind: all, type, class, interface, enum, record, annotation, object, companion, method, field, package or module (default all = types+packages+modules; method|field required to scan members). |
regex | boolean | Treat the pattern as a regex. |
fuzzy | boolean | Levenshtein fallback when nothing matches. |
in | string | Only matches from artifacts whose label matches this glob. |
package | string | Only symbols under this package. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_resolve#
What is this symbol? Short-name resolution with copy-pasteable candidates.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_ls#
External library browser: packages in the workspace roots.
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_tree#
External library browser: artifacts and their package trees.
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
depth | integer | Tree depth (default 8). |
counts | boolean | Annotate nodes with class counts. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_usages#
Find usages of a type or member across the workspace jars and source dirs. With kind=annotation, query may use annotation-use spelling '@Type(k=v)' (issue #26).
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
kind | string | Edge kind: all, call, read, write, ref, new, throw (throws declarations, not ATHROW sites) or annotation (default all). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
context | integer | Snippet lines around each hit (default 0). |
where | string | Comma-separated annotation value predicates key=value (requires kind=annotation; e.g. forRemoval=true). Equivalent: query='@Type(k=v)' with kind=annotation. Issue #26. |
jdx_annotated#
List classes/members carrying an annotation (issue #26). Query may be a type, '@Type(k=v)' use spelling, or a recipe alias (deprecated|forRemoval|test|junit5|junit4|bean). Equivalent to usages with kind=annotation.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
context | integer | Snippet lines around each hit (default 0). |
where | string | Comma-separated annotation value predicates key=value (AND; e.g. forRemoval=true). Equivalent: query='@Type(k=v)'. Issue #26. |
jdx_hierarchy#
Type hierarchy: supertypes upward and subtypes downward across the workspace.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
up | boolean | Walk supertypes (default: both directions unless down is set). |
down | boolean | Walk subtypes (default: both directions unless up is set). |
direct | boolean | Direct parents/children only. |
depth | integer | How many tree levels to walk (default 2147483647). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_implementors#
Who implements this interface or extends this class, transitively.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
direct | boolean | Direct implementors only. |
depth | integer | How many tree levels to walk (default 2147483647). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_callers#
Call hierarchy in: who calls this method, as a depth-bounded tree. Override-aware by default; set exact=true for invoke-owner matching only.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
depth | integer | How many tree levels to walk (default 1). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
exact | boolean | Match invoke owners exactly (no override / supertype expansion). |
jdx_calls#
Call hierarchy out: what this method calls, as a depth-bounded tree.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
depth | integer | How many tree levels to walk (default 1). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
externalOnly | boolean | Prune callees in the target's own artifact (dependency view). |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_samples#
How is this symbol really used? Ranked call sites with source snippets as evidence.
| Parameter | Type | Description |
|---|---|---|
query required | string | The symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
limit | integer | Maximum rows shown (default 3); the rest become a truncation footer. |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
preferSources | boolean | Rank callers from sources-paired artifacts first. |
maxLines | integer | Cap each snippet's shown code lines (default 15). |
jdx_literals#
Search string constants across bytecode roots (LDC loads and String field ConstantValue) and .properties resource keys/values. Substring by default; set regex=true for a Java regex.
| Parameter | Type | Description |
|---|---|---|
query required | string | Substring (or regex pattern) to find in string constants. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
regex | boolean | Treat query as a Java regex. |
ignoreCase | boolean | Case-insensitive substring match (ignored under regex; use (?i) there). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_services#
List META-INF/services SPI registrations across the workspace jars. Omit query to list every registration; with a query, match the service interface FQN or a provider class FQN. Does not read module-info provides (use jdx_modules for that).
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
regex | boolean | Treat query as a Java regex. |
ignoreCase | boolean | Case-insensitive substring match (ignored under regex; use (?i) there). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_modules#
List JPMS module-info descriptors across the workspace (requires, exports, opens, uses, provides). Omit query to list every module; with a query, match the module name, an exported/opened package, a uses/provides service, or a provider class. Does not read META-INF/MANIFEST.MF attributes (use jdx_manifest for that).
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
regex | boolean | Treat query as a Java regex. |
ignoreCase | boolean | Case-insensitive substring match (ignored under regex; use (?i) there). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_manifest#
List META-INF/MANIFEST.MF attributes across the workspace jars. Default: main-section attributes. Set entries=true for per-entry (JarEntry) attributes instead. Omit query to list every attribute in that section; with a query, match the attribute name or value (and entry path when entries=true). Does not extract resource file bytes (use jdx_resources with cat=true for text).
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
entries | boolean | List per-entry (JarEntry) attributes instead of main-section attributes. |
regex | boolean | Treat query as a Java regex. |
ignoreCase | boolean | Case-insensitive substring match (ignored under regex; use (?i) there). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_resources#
List non-class resource paths across the workspace jars (META-INF, .properties, versioned META-INF/versions/… copies, …). Omit query to list every resource; with a query, match the entry path. Pass cat=true to print the unique match's text contents (binary payloads refuse to dump bytes; ambiguous matches exit 2). maxLines caps --cat text lines (default 200).
| Parameter | Type | Description |
|---|---|---|
query | string | Optional subject: package glob (ls), artifact glob (tree), service/provider substring (services), or module/package/service substring (modules). Empty lists everything. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
cat | boolean | Print the unique matching resource's text instead of listing paths. Requires a query; exits 2 when more than one path matches. |
maxLines | integer | Maximum text lines shown under cat=true (default 200). |
regex | boolean | Treat query as a Java regex. |
ignoreCase | boolean | Case-insensitive substring match (ignored under regex; use (?i) there). |
in | string | Only matches from artifacts whose label matches this glob. |
exclude | string | Skip matches from artifacts whose label matches this glob. |
limit | integer | Maximum rows shown (default 50); the rest become a truncation footer. |
jdx_diff#
What changed between two artifacts? Public-API diff with named binary-compatibility rules (MEMBER_REMOVED, RETURN_TYPE_CHANGED, ...), most breaking first. query is the OLD artifact and new the candidate; each is a jar, class dir, glob, or Maven coordinate. Exits 0 whenever the comparison ran.
| Parameter | Type | Description |
|---|---|---|
query required | string | The OLD (baseline) artifact: jar file, class directory, glob, or group:artifact:version. |
new required | string | The NEW (candidate) artifact, compared against query. |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
visibility | string | public (default: public and protected declarations) or all (every declared type and member). |
includeSynthetic | boolean | Compare bridge/synthetic members too, hidden by default. |
severity | string | How much to print: all (default), suspicious (breaking and suspicious), or breaking only. The tally always describes everything. |
failOn | string | none (default, always 0), breaking (exit 1 on a breaking change) or any (exit 1 on any difference). |
limit | integer | Maximum rows shown (default 200); the rest become a truncation footer. |
jdx_version#
The jdx version this server was built as.
| Parameter | Type | Description |
|---|---|---|
query | string | Optional label echoed back in the envelope (empty is fine). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
jdx_doctor#
Environment report. The server refuses this over MCP — it describes the server's machine, not the client's — run jdx doctor in a shell instead.
| Parameter | Type | Description |
|---|---|---|
query | string | Optional label echoed back in the envelope (empty is fine). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |
jdx_health#
Liveness probe: uptime, workspace served and queries answered.
| Parameter | Type | Description |
|---|---|---|
query | string | Optional label echoed back in the envelope (empty is fine). |
workspace | string | Named workspace to answer from (default: the workspace the server was started with). Stored workspaces only. |