Skip to main content
Glama

Focus macOS or Windows app by process ID

exza_desktop_focus_window
Destructive

DESKTOP ACTION: Focus a visible macOS or Windows app window using the PID from exza_desktop_windows. macOS requires Accessibility; Windows may deny focus under secure desktop or process integrity restrictions. Requires owner approval.

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": "exza_desktop_focus_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), it discloses permission requirements, platform-specific failure modes (secure desktop, process integrity on Windows), and an approval gate. It stops short of saying what a failed or successful focus attempt returns, but the risk profile is well covered.

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?

Three short sentences, front-loaded with the action label and resource before the caveats. Every clause contributes (source of PID, platform prerequisites, approval), with little redundancy.

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 single-parameter action with no output schema, the description supplies the origin of the input, the permission/approval gates, and platform-specific denial conditions. The only notable omission is expected result behavior on success or failure.

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 0%, so the description must carry the parameter meaning, and it does: pid is a process ID sourced from exza_desktop_windows, and it must identify a visible app window rather than an arbitrary process. No format or error-for-invalid-PID detail, hence not a 5.

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 (focus) and resource (a visible macOS/Windows app window) and pins the input source to the PID from exza_desktop_windows. The 'visible ... app window' qualifier distinguishes it from process-level or non-window siblings.

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 concrete preconditions: obtain the PID from exza_desktop_windows, macOS needs Accessibility permission, and owner approval must be granted. It does not explicitly contrast with the similarly named exza_desktop_focus or exza_desktop_active_window, so the when-not case is left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources