joLink

v0.1.0a10
io.github.L1ch404/jolink-runtime Checked 3 days ago Published 1 month ago

A lightweight Java IDE for AI agents: incremental builds, fast tests, HotSwap and live debugging.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

java_application

Launch, attach, restart, stop, or detach Java applications. For Maven/Gradle, use project_path plus main_class without IDEA, or select an IDEA launch. Use java_fast_test to run tests without launching an application. Launch and restart wait up to timeout (at most 30 seconds), returning the result if finished or the original background task if still running. After editing a managed Maven/Gradle project, use restart: it detects changed sources, incrementally compiles them, and prefers HotSwap (hotswap=true by default). Incompatible changes use the same compiled outputs to restart the JVM. Set ho…

ParameterTypeDescription
action *stringRuntime operation to perform.
app_argsarrayApplication arguments for launch/restart. Replaces imported or current arguments; [] clears them.
build_java_homestringJDK home used to prepare a Maven or Gradle project during project_path launch. Separate from the application's java_home. Omit to use project/environment settings. Restart inherits the launch choices.
build_systemstringOptional authoritative build system for project launch; specify maven or gradle when both exist.
classpathstringClasspath for direct launch/restart with main_class; omit with project_path.
hoststringDebug connection host; localhost only.
hotswapbooleanFor restart, default true: incrementally compile edits and prefer HotSwap; if changes cannot be hot-swapped, restart the JVM with those compiled outputs. False forces a JVM restart after compilation.…
jar_pathstringExecutable JAR for direct launch/restart; omit with project_path.
java_homestringApplication JDK home directory for project, classpath or JAR launch. Restart inherits the previous selection; supplying a different JDK replaces the JVM instead of HotSwap.
jdwp_portintegerLocal Java debug port for launch or attach.
launch_namestringOptional exact case-sensitive IDEA launch configuration name; requires project_path. With main_class and no launch_name, no IDEA launch configuration is required. Explicit main_class, java_home, app_a…
main_classstringFully qualified application entry class. With project_path, launch without requiring IDEA configuration; otherwise uses classpath.
maven_homestringOptional Maven installation directory, used instead of the project Wrapper or automatically selected Maven.
maven_settingsstringOptional Maven user settings.xml path, including repository mirrors and credentials. The file is not modified.
pidintegerLocal Java PID required by attach.
project_pathstringMaven or Gradle project directory. Supply main_class for an IDEA-independent launch, or import an IDEA launch configuration (launch_name selects one). Compiles changed sources before starting the appl…
ready_portintegerLocal application TCP port for launch/restart readiness; must differ from jdwp_port.
timeoutnumberSeconds to wait for the launch/restart result in this call. Defaults to 30; values above 30 wait only 30 seconds without error. Zero returns immediately after submission. On expiry the same task conti…
vm_argsarrayJVM arguments for launch/restart. Replaces imported or current arguments; [] clears them.

java_fast_test

Run selected Java tests in Maven or Gradle projects, incrementally compiling changed sources. Supports JUnit 4/5 and TestNG. No application launch is required, and an existing application is left running. Provide project_path and tests (Class or Class#method); action defaults to run. First-time preparation and compilation can take minutes; subsequent calls reuse unchanged results. Waits up to timeout (maximum 30 seconds); unfinished work returns its test_run_id and continues in the background. Observe it with java_status or cancel it here using action='cancel' and the same test_run_id. If comp…

ParameterTypeDescription
actionstringOmit or use run to execute tests; use result with test_run_id to read diagnostics and failure details plus captured test output without rerunning; use cancel to stop that test run.
build_java_homestringJDK home for Maven or Gradle project preparation. Omit to use java_home or project/environment settings.
build_systemstringOptional authoritative build system for tests; specify maven or gradle when both exist.
java_homestringJDK home for running tests; overrides the project's test JVM. Omit to follow project settings. Also used for project preparation when build_java_home is omitted.
maven_homestringOptional Maven installation directory, used instead of the project Wrapper or automatically selected Maven.
maven_settingsstringOptional Maven user settings.xml path, including repository mirrors and credentials. The file is not modified.
project_pathstringMaven project or Gradle Wrapper project directory containing the selected tests. No IDEA launch configuration or running application is required.
source_filesarrayOptional changed Java source paths relative to project_path, including module prefixes. May include added, edited, or deleted main/test files. Normally omit: changes are detected automatically.
test_run_idstringTest run ID returned by java_fast_test; required for action='cancel' or 'result'. Results are retained for the active and most recently finished run in this MCP session.
testsarrayExplicit Fast Test selectors as fully qualified Class or Class#method. Fast Test v1 supports JUnit 4/5 and TestNG.
timeoutnumberSeconds to wait for this test result: default 30, values above 30 wait only 30, zero submits immediately. Expiry leaves the same task running. This controls how long the call waits, not the test execu…

java_status

Discover local Java processes, inspect a compact application/build overview with status, or request current launch/restart details with status and details=true. Use logs with source=application (default) or source=build for log text. status omits build-log text and detailed launch/restart results. It includes only a Fast Test summary; read test details with java_fast_test(action='result', test_run_id=...).

ParameterTypeDescription
action *stringstatus returns a compact overview; use details=true for launch/restart details; logs reads a bounded log tail.
detailsbooleanFor status: include current launch/restart diagnostics, configuration and detailed results. Does not rerun work; use logs for log text.
filterstringOptional case-insensitive process filter.
fullbooleanInclude JVM arguments; slower and more verbose.
sourcestringFor logs: application output (default), or the current project launch's build log.
tailintegerLines from the selected application/build log tail. Returns truncation and scan metadata.

java_debugger

Observe executed paths and runtime state with breakpoints, exception events, stacks, and variables. Use evaluate for Java expressions in a suspended frame; method calls may change application state. Always resume or clean up every suspension.

ParameterTypeDescription
action *stringRuntime operation to perform.
allow_broad_caughtbooleanAllow noisy broad caught-exception watches.
bp_actionstringBreakpoint operation.
breakpoint_idstringBreakpoint identifier returned by set/list.
caughtbooleanWatch caught exceptions.
class_patternstringClass name/pattern for breakpoint set or removal.
exception_actionstringException-watch operation.
exception_classstringException class in Java name, JVM path, or signature form.
expressionstringJava expression required for evaluate, using the selected suspended frame's locals and this. Method calls execute in the application and may have side effects.
frame_indexintegerFrame index for variables or evaluate.
hoststringDebug connection host; localhost only.
http_triggerobjectOptional loopback request started only after event waiting is armed. Use with blocking for one-call arm/trigger/await, or with arm when work must occur before a later await. It is rejected while confi…
include_generatedbooleanAllow generated classes in breakpoint matching.
include_proxybooleanAllow proxy classes in breakpoint matching.
include_thisbooleanInclude this in variables.
item_limitintegerMaximum list/set/array items.
jdwp_portintegerLocal Java debug port for launch or attach.
lineintegerSource line for breakpoint set/removal.
map_entry_limitintegerMaximum map entries.
max_framesintegerMaximum stack frames.
max_value_depthintegerObject expansion depth.
request_idintegerException-watch identifier returned by set/list.
semantic_collectionsbooleanRender supported Java collections logically.
suspension_idstringActive suspension id returned by wait_event/status. Pass it to stack, variables, evaluate, and resume so stale observations are rejected; stack/variables/evaluate use its event-hit thread when thread_…
thread_namestringOptional fallback selector for stack/variables/evaluate. Omit it to use the active suspension's event-hit thread. Exact names are preferred; otherwise a unique prefix or substring must identify one JV…
timeoutnumberSeconds to wait for an event or expression evaluation. An evaluation timeout does not undo side effects or guarantee that the invoked method stopped; do not automatically retry it.
uncaughtbooleanWatch uncaught exceptions.
wait_handlestringActive observation handle returned by arm or a nonterminal blocking result.
wait_modestringblocking waits directly; with http_trigger it performs arm, trigger, and await in one call. Use arm then await with its wait_handle when an external action is needed after event waiting is armed. Resu…