Skip to main content
Glama

workspace_launch

Launch an application and wait for its new window to appear, returning window title, HWND, and process ID. Supports localized window titles via HWND-based detection.

Instructions

Purpose: Launch an application and wait for its new window to appear, returning title, HWND, and PID. Details: Runs the command via ShellExecute, snapshots the window list before launch, then polls until a new HWND appears (compared by HWND, not title). Returns {windowTitle, hwnd, pid, elapsedMs}. Works for localized window titles (e.g. '電卓' for calc.exe) because detection is HWND-based, not title-based. timeoutMs default 10000. detach=true fires without waiting and returns no window info. Prefer: Use instead of run_macro({exec, sleep, desktop_discover}) combos. Follow with focus_window(windowTitle) to interact with the launched app. Caveats: Single-instance apps that reuse an existing window will not register as a new HWND — call desktop_discover first to check if the window is already open. detach=true returns immediately with no window title or hwnd. Examples: workspace_launch({command:'notepad.exe'}) → {windowTitle:'', hwnd:'...', pid:...} workspace_launch({command:'calc.exe', timeoutMs:15000})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoCommand-line arguments (max 20).
waitMsNoMilliseconds to wait for the window to appear (default 2000)
commandYesExecutable name or full path (e.g. 'notepad.exe', 'calc.exe', 'cmd.exe', 'powershell').
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
Behavior5/5

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

Without annotations, description fully discloses behavioral traits: ShellExecute, window snapshot polling, HWND-based detection, localized title handling, timeout and detach behaviors, and single-instance caveat. No contradictions.

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

Conciseness4/5

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

Well-structured with clear headings and front-loaded purpose. No fluff, but includes inaccurate parameter references that harm conciseness. Slight deduction for misleading details.

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

Completeness3/5

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

Explains return format, gives examples, and covers caveats. However, the mismatch with actual schema parameters (timeoutMs vs waitMs, missing args and include) leaves gaps in accurate understanding. Adequate but imperfect.

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

Parameters2/5

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

Schema coverage is 100%, so baseline is 3. However, description introduces parameters 'timeoutMs' and 'detach' that do not exist in the input schema, and states a default timeout of 10000 while schema shows 'waitMs' default 2000. This inconsistency misleads the agent and reduces value.

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?

The description clearly states the verb 'launch' and resource 'application', and specifies the waiting behavior and return values. It explicitly distinguishes from sibling tool 'run_macro' by recommending use instead of manual combos.

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

Usage Guidelines5/5

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

Provides explicit guidance: prefer over run_macro, follow with focus_window, and caveats for single-instance apps. Also covers detach=true scenario. No ambiguity about when to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wangkang1133/desktop-touch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server