connect_app
Attach to a running Java process by PID, loading the agent if needed without restarting, so the application retains open windows and login state.
Instructions
Connect to a running Java application by pid (see list_apps). If it was started without swing2mcp, the agent is loaded into it first: no restart, and the application keeps its state (open windows, logged-in user). Works with Java 8+ processes of the same OS user.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pid": "<pid>"
},
"name": "connect_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes |