Documentation menu

MCP tools

jdx mcp serves 21 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).

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
kindstringMember kind to list: method, field, ctor, property or all (default all).
accessstringVisibility to list: public, protected, package, private or all (default: public + protected).
staticbooleanOnly static members (mutually exclusive with instance).
instancebooleanOnly instance members (mutually exclusive with static).
fromstringOnly members inherited from this supertype.
grepstringOnly members whose name matches this regex.
includeSyntheticbooleanInclude bridge/synthetic members, hidden by default.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.
withDocbooleanInclude the first javadoc sentence per member.
sortstringRow order: kind (the default), name (flat name-first) or declaring.
viewstringDeclaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection).
declaredbooleanOnly 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).

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
kindstringMember kind to list: method, field, ctor, property or all (default all).
accessstringVisibility to list: public, protected, package, private or all (default: public + protected).
staticbooleanOnly static members (mutually exclusive with instance).
instancebooleanOnly instance members (mutually exclusive with static).
fromstringOnly members inherited from this supertype.
grepstringOnly members whose name matches this regex.
includeSyntheticbooleanInclude bridge/synthetic members, hidden by default.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.
withDocbooleanInclude the first javadoc sentence per member.
sortstringRow order: kind (the default), name (flat name-first) or declaring.
viewstringDeclaration 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
contextintegerExtra lines around the body (default 0).
lineNumbersbooleanPrefix every line with its 1-based number.
maxLinesintegerCap the body slice (default 200).
withSignaturebooleanPrepend the member signature line.
withDocbooleanAppend the member javadoc.
enginestringForce 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
linesstringLine window A:B (1-based, inclusive).
aroundstringCenter the slice on this member ref.
contextintegerExtra lines around the slice (default 0).
lineNumbersbooleanPrefix every line with its 1-based number.
maxLinesintegerCap the slice (default 200).
enginestringForce a reconstruction engine: vineflower or javap (default: paired sources first).

jdx_signature#

Parameter info: one signature line per overload, with real parameter names.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
includeSyntheticbooleanInclude bridge/synthetic members, hidden by default.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.
viewstringDeclaration 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
inheritedbooleanAllow the supertype fallback (the default; accepted for explicitness).
no-inheritedbooleanOnly docs written on this exact symbol (mutually exclusive with inherited).
rawbooleanRaw javadoc text instead of the rendered form.
maxLinesintegerCap the doc text (default 200).

Search everywhere: symbols by glob, regex or fuzzy name, with did-you-mean.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
kindstringSymbol kind: all, type, class, interface, enum, record, annotation, object, companion, method, field, package or module (default all).
regexbooleanTreat the pattern as a regex.
fuzzybooleanLevenshtein fallback when nothing matches.
instringOnly matches from artifacts whose label matches this glob.
packagestringOnly symbols under this package.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_resolve#

What is this symbol? Short-name resolution with copy-pasteable candidates.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_ls#

External library browser: packages in the workspace roots.

ParameterTypeDescription
querystringPackage glob (ls) or artifact glob (tree); empty lists everything.
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_tree#

External library browser: artifacts and their package trees.

ParameterTypeDescription
querystringPackage glob (ls) or artifact glob (tree); empty lists everything.
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
depthintegerTree depth (default 8).
countsbooleanAnnotate nodes with class counts.
limitintegerMaximum 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
kindstringEdge kind: all, call, read, write, ref, new, throw (throws declarations, not ATHROW sites) or annotation (default all).
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.
contextintegerSnippet lines around each hit (default 0).

jdx_hierarchy#

Type hierarchy: supertypes upward and subtypes downward across the workspace.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
upbooleanWalk supertypes (default: both directions unless down is set).
downbooleanWalk subtypes (default: both directions unless up is set).
directbooleanDirect parents/children only.
depthintegerHow many tree levels to walk (default 2147483647).
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_implementors#

Who implements this interface or extends this class, transitively.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
directbooleanDirect implementors only.
depthintegerHow many tree levels to walk (default 2147483647).
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_callers#

Call hierarchy in: who calls this method, as a depth-bounded tree.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
depthintegerHow many tree levels to walk (default 1).
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
limitintegerMaximum rows shown (default 50); the rest become a truncation footer.

jdx_calls#

Call hierarchy out: what this method calls, as a depth-bounded tree.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
depthintegerHow many tree levels to walk (default 1).
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
externalOnlybooleanPrune callees in the target's own artifact (dependency view).
limitintegerMaximum 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.

ParameterTypeDescription
query requiredstringThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
limitintegerMaximum rows shown (default 3); the rest become a truncation footer.
instringOnly matches from artifacts whose label matches this glob.
excludestringSkip matches from artifacts whose label matches this glob.
preferSourcesbooleanRank callers from sources-paired artifacts first.

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.

ParameterTypeDescription
query requiredstringThe OLD (baseline) artifact: jar file, class directory, glob, or group:artifact:version.
new requiredstringThe NEW (candidate) artifact, compared against query.
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
visibilitystringpublic (default: public and protected declarations) or all (every declared type and member).
includeSyntheticbooleanCompare bridge/synthetic members too, hidden by default.
severitystringHow much to print: all (default), suspicious (breaking and suspicious), or breaking only. The tally always describes everything.
failOnstringnone (default, always 0), breaking (exit 1 on a breaking change) or any (exit 1 on any difference).
limitintegerMaximum rows shown (default 200); the rest become a truncation footer.

jdx_version#

The jdx version this server was built as.

ParameterTypeDescription
querystringOptional label echoed back in the envelope (empty is fine).
workspacestringNamed 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.

ParameterTypeDescription
querystringOptional label echoed back in the envelope (empty is fine).
workspacestringNamed 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.

ParameterTypeDescription
querystringOptional label echoed back in the envelope (empty is fine).
workspacestringNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.

View as Markdown · Updated