These examples show the expected AI behavior when the DebugTools method invocation or Hotswap skills are active.
User:
Call com.demo.HealthController.ping.
AI:
1. list_debug_tools_connections
2. Reuse the only active connection.
3. invoke_java_method:
className = com.demo.HealthController
methodName = ping
argsJson omitted
Key point: do not attach again when a suitable connection already exists.
User:
Call com.demo.UserController.createUser with name Codex and age 18.
AI:
1. list_debug_tools_connections
2. generate_method_args_template:
className = com.demo.UserController
methodName = createUser
3. Fill only returned content values:
name.content = "Codex"
age.content = 18
4. invoke_java_method with the generated argsJson.
Example argsJson shape:
{
"name": { "type": "simple", "content": "Codex" },
"age": { "type": "simple", "content": 18 }
}Key point: argsJson is the top-level RunContentDTO map. Do not wrap it in targetMethodContent.
Previous invocation failed:
ClassNotFoundException: com.demo.UserController
Connection data includes:
{
"connectionId": "local:demo:12345",
"host": "127.0.0.1",
"httpPort": 22222,
"defaultClassLoader": null
}AI:
1. Do not look for list_debug_tools_classloaders.
2. GET http://127.0.0.1:22222/allClassLoader
3. POST http://127.0.0.1:22222/classLoader/hasClass
{ "className": "com.demo.UserController", "classLoaderIdentity": "<identity>" }
4. If exactly one loader matches, retry invoke_java_method with:
connectionId = local:demo:12345
classLoaderIdentity = <identity>
5. If multiple loaders match, ask the user to choose.
Key point: ClassLoader discovery is direct DebugTools agent HTTP, not an MCP tool.
User:
Start the DemoApplication run configuration with DebugTools Hotswap.
AI:
1. execute_debug_tools_run_configuration:
configurationName = DemoApplication
2. Report that the DebugTools Hotswap startup request was submitted.
If the run configuration name is unclear:
1. list_debug_tools_run_configurations
2. Ask the user to choose when multiple configurations match.
3. execute_debug_tools_run_configuration with the exact selected name.
Key point: success=true means startup was requested, not that DebugTools is already connected.