{"at":"2026-11-23T03:14:10.205Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:14:11.146Z","dir":"received","era":"server_discover","message":{"error":{"code":-32602,"data":"","message":"Invalid request parameters"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:14:11.297Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:14:12.248Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"experimental":{},"tools":{"listChanged":false}},"instructions":"Use java_fast_test for selected Java tests without an application launch; use java_application for application lifecycle and compile-aware restart, and java_status for process, test, state, and log observations, and java_debugger for breakpoints and runtime inspection. Before applying edited code to a running application, prefer an explicit Fast Test for supported Maven/Gradle projects and JUnit/TestNG tests. Treat runtime outputs as bounded observations, not as self-explanatory causal conclusions. Clearly separate directly observed facts, inferences, and what remains unverified. Do not declare a root cause until evidence shows that the suspected mechanism actually occurred in the current scenario. When multiple explanations remain consistent with the evidence, seek the next piece of evidence that best distinguishes them. After inspecting a suspension, always call resume or cleanup_debug_state.","protocolVersion":"2025-11-25","serverInfo":{"name":"jolink-runtime","version":"0.1.0a10"}}}}
{"at":"2026-11-23T03:14:12.248Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:14:12.248Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:14:12.249Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"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 hotswap=false for a real process restart and application reinitialization. apply_method reports hotswap or restart; HotSwap does not refresh framework state or count as a JVM startup. previous_startup_ms reports the prior successful startup duration saved locally for this launch, or null if unavailable. It survives MCP restarts and excludes compilation. A pending restart returns reload_id; observe active_operation and last_reload using java_status. Direct JAR/classpath launches restart their existing artifact without source compilation.","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"Runtime operation to perform.","enum":["launch","attach","restart","stop","detach"],"type":"string"},"app_args":{"description":"Application arguments for launch/restart. Replaces imported or current arguments; [] clears them.","items":{"type":"string"},"type":"array"},"build_java_home":{"description":"JDK 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.","type":"string"},"build_system":{"description":"Optional authoritative build system for project launch; specify maven or gradle when both exist.","enum":["maven","gradle"],"type":"string"},"classpath":{"description":"Classpath for direct launch/restart with main_class; omit with project_path.","type":"string"},"host":{"default":"127.0.0.1","description":"Debug connection host; localhost only.","enum":["127.0.0.1","localhost"],"type":"string"},"hotswap":{"default":true,"description":"For 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. Use false to reinitialize application state or reload framework/startup configuration. No pending code changes also restart the JVM without recompiling.","type":"boolean"},"jar_path":{"description":"Executable JAR for direct launch/restart; omit with project_path.","type":"string"},"java_home":{"description":"Application JDK home directory for project, classpath or JAR launch. Restart inherits the previous selection; supplying a different JDK replaces the JVM instead of HotSwap.","type":"string"},"jdwp_port":{"default":5005,"description":"Local Java debug port for launch or attach.","maximum":65535,"minimum":1024,"type":"integer"},"launch_name":{"description":"Optional 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_args and vm_args override imported values.","type":"string"},"main_class":{"description":"Fully qualified application entry class. With project_path, launch without requiring IDEA configuration; otherwise uses classpath.","type":"string"},"maven_home":{"description":"Optional Maven installation directory, used instead of the project Wrapper or automatically selected Maven.","type":"string"},"maven_settings":{"description":"Optional Maven user settings.xml path, including repository mirrors and credentials. The file is not modified.","type":"string"},"pid":{"description":"Local Java PID required by attach.","minimum":1,"type":"integer"},"project_path":{"description":"Maven 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 application. Do not combine with direct jar_path or classpath.","type":"string"},"ready_port":{"description":"Local application TCP port for launch/restart readiness; must differ from jdwp_port.","maximum":65535,"minimum":1,"type":"integer"},"timeout":{"default":30,"description":"Seconds 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 continues in the background.","minimum":0,"type":"number"},"vm_args":{"description":"JVM arguments for launch/restart. Replaces imported or current arguments; [] clears them.","items":{"type":"string"},"type":"array"}},"required":["action"],"type":"object"},"name":"java_application"},{"description":"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 compilation fails before run returns, it includes compiler diagnostics directly. java_status stays compact; use action='result' with test_run_id for background error diagnostics, failed-test details, and captured test stdout/stderr without rerunning tests. Result includes the last 50 lines of combined test output (up to 16 KiB), output_truncated, and local log_files paths. Read those files directly when more output is needed. This is not the complete Maven/Gradle verification or packaging lifecycle.","inputSchema":{"additionalProperties":false,"allOf":[{"else":{"required":["project_path","tests"]},"if":{"properties":{"action":{"enum":["cancel","result"]}},"required":["action"]},"then":{"required":["test_run_id"]}}],"properties":{"action":{"default":"run","description":"Omit 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.","enum":["run","cancel","result"],"type":"string"},"build_java_home":{"description":"JDK home for Maven or Gradle project preparation. Omit to use java_home or project/environment settings.","minLength":1,"type":"string"},"build_system":{"description":"Optional authoritative build system for tests; specify maven or gradle when both exist.","enum":["maven","gradle"],"type":"string"},"java_home":{"description":"JDK 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.","type":"string"},"maven_home":{"description":"Optional Maven installation directory, used instead of the project Wrapper or automatically selected Maven.","type":"string"},"maven_settings":{"description":"Optional Maven user settings.xml path, including repository mirrors and credentials. The file is not modified.","type":"string"},"project_path":{"description":"Maven project or Gradle Wrapper project directory containing the selected tests. No IDEA launch configuration or running application is required.","type":"string"},"source_files":{"description":"Optional 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.","items":{"minLength":1,"type":"string"},"maxItems":16,"minItems":1,"type":"array","uniqueItems":true},"test_run_id":{"description":"Test 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.","type":"string"},"tests":{"description":"Explicit Fast Test selectors as fully qualified Class or Class#method. Fast Test v1 supports JUnit 4/5 and TestNG.","items":{"minLength":1,"type":"string"},"maxItems":64,"minItems":1,"type":"array","uniqueItems":true},"timeout":{"default":30,"description":"Seconds 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 execution time limit.","minimum":0,"type":"number"}},"required":[],"type":"object"},"name":"java_fast_test"},{"description":"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=...).","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"status returns a compact overview; use details=true for launch/restart details; logs reads a bounded log tail.","enum":["processes","status","logs"],"type":"string"},"details":{"default":false,"description":"For status: include current launch/restart diagnostics, configuration and detailed results. Does not rerun work; use logs for log text.","type":"boolean"},"filter":{"description":"Optional case-insensitive process filter.","type":"string"},"full":{"default":false,"description":"Include JVM arguments; slower and more verbose.","type":"boolean"},"source":{"default":"application","description":"For logs: application output (default), or the current project launch's build log.","enum":["application","build"],"type":"string"},"tail":{"default":50,"description":"Lines from the selected application/build log tail. Returns truncation and scan metadata.","maximum":500,"minimum":1,"type":"integer"}},"required":["action"],"type":"object"},"name":"java_status"},{"description":"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.","inputSchema":{"additionalProperties":false,"allOf":[{"if":{"properties":{"action":{"const":"evaluate"}},"required":["action"]},"then":{"required":["expression"]}}],"properties":{"action":{"description":"Runtime operation to perform.","enum":["breakpoint","exception","wait_event","threads","stack","variables","evaluate","resume","cleanup_debug_state"],"type":"string"},"allow_broad_caught":{"default":false,"description":"Allow noisy broad caught-exception watches.","type":"boolean"},"bp_action":{"default":"set","description":"Breakpoint operation.","enum":["set","remove","list"],"type":"string"},"breakpoint_id":{"description":"Breakpoint identifier returned by set/list.","type":"string"},"caught":{"default":true,"description":"Watch caught exceptions.","type":"boolean"},"class_pattern":{"description":"Class name/pattern for breakpoint set or removal.","type":"string"},"exception_action":{"default":"set","description":"Exception-watch operation.","enum":["set","remove","list"],"type":"string"},"exception_class":{"description":"Exception class in Java name, JVM path, or signature form.","type":"string"},"expression":{"description":"Java expression required for evaluate, using the selected suspended frame's locals and this. Method calls execute in the application and may have side effects.","minLength":1,"pattern":"\\S","type":"string"},"frame_index":{"default":0,"description":"Frame index for variables or evaluate.","minimum":0,"type":"integer"},"host":{"default":"127.0.0.1","description":"Debug connection host; localhost only.","enum":["127.0.0.1","localhost"],"type":"string"},"http_trigger":{"additionalProperties":false,"description":"Optional 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 configured application readiness is starting; unverified readiness is allowed with a warning. Never send the same request again.","properties":{"headers":{"additionalProperties":{"type":"string"},"maxProperties":32,"type":"object"},"json_body":{},"method":{"enum":["GET","POST","PUT","PATCH","DELETE"],"type":"string"},"timeout_seconds":{"default":30,"maximum":120,"minimum":0.1,"type":"number"},"url":{"description":"http://127.0.0.1 URL only.","maxLength":2048,"type":"string"}},"required":["method","url"],"type":"object"},"include_generated":{"default":false,"description":"Allow generated classes in breakpoint matching.","type":"boolean"},"include_proxy":{"default":false,"description":"Allow proxy classes in breakpoint matching.","type":"boolean"},"include_this":{"default":false,"description":"Include this in variables.","type":"boolean"},"item_limit":{"default":16,"description":"Maximum list/set/array items.","maximum":64,"minimum":0,"type":"integer"},"jdwp_port":{"default":5005,"description":"Local Java debug port for launch or attach.","maximum":65535,"minimum":1024,"type":"integer"},"line":{"description":"Source line for breakpoint set/removal.","minimum":1,"type":"integer"},"map_entry_limit":{"default":16,"description":"Maximum map entries.","maximum":64,"minimum":0,"type":"integer"},"max_frames":{"default":20,"description":"Maximum stack frames.","maximum":100,"minimum":1,"type":"integer"},"max_value_depth":{"default":1,"description":"Object expansion depth.","maximum":5,"minimum":0,"type":"integer"},"request_id":{"description":"Exception-watch identifier returned by set/list.","minimum":1,"type":"integer"},"semantic_collections":{"default":true,"description":"Render supported Java collections logically.","type":"boolean"},"suspension_id":{"description":"Active 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_name is omitted.","type":"string"},"thread_name":{"description":"Optional 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 JVM thread. The selected thread must be suspended for stack/variables/evaluate to succeed.","type":"string"},"timeout":{"default":30,"description":"Seconds 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.","maximum":300,"minimum":0.1,"type":"number"},"uncaught":{"default":true,"description":"Watch uncaught exceptions.","type":"boolean"},"wait_handle":{"description":"Active observation handle returned by arm or a nonterminal blocking result.","type":"string"},"wait_mode":{"default":"blocking","description":"blocking 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. Resume every suspension.","enum":["blocking","arm","await"],"type":"string"}},"required":["action"],"type":"object"},"name":"java_debugger"}]}}}
