Skip to main content
Glama

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

NameRequiredDescriptionDefault
cwdNoWorking directory (default: current directory)
commandYesShell command that starts the application
timeoutSecondsNoHow long to wait for the agent (default 60)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full disclosure burden and does most of it: it reveals the injection mechanism (JAVA_TOOL_OPTIONS), states the application is not modified, notes output goes to a log file, and describes when it returns. Gaps remain: the log file path is unspecified, and there is no mention of timeout failure behavior or whether the launched process must later be terminated via stop_app.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the verb and resource, then mechanism, then return timing and next step. Nothing is wasted and the follow-up action sits at the end where it is most likely to be acted on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter process-launch tool with no output schema, the description covers the essential contract: what starts, how it is instrumented, where output goes, and that the first window will not be ready. Only the log file location and failure/cleanup behavior are left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning for `command` by giving example command lines and clarifying that agent flags need not be included because they are injected via the environment. That prevents a common misuse the schema alone would not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Start a Java Swing application with the swing2mcp agent injected.' The scope is narrowed further by the JAVA_TOOL_OPTIONS note, making clear this tool launches a new process rather than attaching to an existing one, which is enough for an agent to distinguish it from connect_app/list_apps on its own.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit post-call guidance ('call wait_for next') and explains the return timing ('returns once the agent is up, usually before the first window'), which is genuine sequencing context. It stops short of an explicit exclusion such as 'if the app is already running, use connect_app instead', leaving that inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.