launch_app
Starts a Java Swing application with the swing2mcp agent injected and connects to it, enabling AI tools to inspect and control the running UI.
Instructions
Start a Java Swing application with the swing2mcp agent injected and connect to it. command is a shell command line, e.g. java -jar app.jar or a start script; the agent is added through JAVA_TOOL_OPTIONS, so the application itself is not changed. Application output goes to a log file. Returns once the agent is up, usually before the first window: call wait_for next.
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": {
"command": "<command>"
},
"name": "launch_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (default: current directory) | |
| command | Yes | Shell command that starts the application | |
| timeoutSeconds | No | How long to wait for the agent (default 60) |