Skip to main content
Glama

Activate app

activate_app
Idempotent

Bring an app's windows to the foreground and give it keyboard focus. type_text, press_key and element-id actions such as click and set_value do not need it; use it only when the app itself must be in front.

Instructions

Bring an app's windows to the foreground and give it keyboard focus. type_text, press_key and element-id actions such as click and set_value do not need it; use it only when the app itself must be in front. Side effect: the window the user was working in loses focus.

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": {
      "app": "<app>"
    },
    "name": "activate_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesApp name, bundle id, or pid exactly as reported by list_apps
window_idNoWindows only: bring this one window forward instead of the app's frontmost window, for an app with several windows such as Chrome. Use the window_id from a get_app_state window line; it must belong to app. The result names the window in front afterwards.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.3
    • addedInput schema / properties / window_id
      Added value: +{
      +  "description": "Windows only: bring this one window forward instead of the app's frontmost window, for an app with several windows such as Chrome. Use the window_id from a get_app_state window line; it must belong to app. The result names the window in front afterwards.",
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv0.3.1
    • addedInput schema / properties / app / description
      Added value: +"App name, bundle id, or pid exactly as reported by list_apps"
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare non-readOnly, idempotent and non-destructive, but do not convey the user-visible focus steal. The description adds that context ('the window the user was working in loses focus'), which is exactly the behavioral trait annotations miss. It stops short of describing what happens if the app isn't running, but the key side effect is disclosed.

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?

Two tight sentences, front-loaded with the action, followed by the usage condition and the side effect. No filler or repetition of the title.

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?

Covers purpose, exclusions, and the main side effect for a small two-parameter tool whose schema is fully documented. Minor gaps: nothing about failure when the app is not running or how activation interacts with multiple displays, but the essentials for correct invocation are present.

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

Parameters3/5

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

Schema description coverage is 100%, including the app identifier format and the Windows-only window_id semantics, so the schema carries the parameter burden. The description adds no parameter detail beyond that, so baseline 3 applies.

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 ('Bring an app's windows to the foreground and give it keyboard focus') with the observable effect, and distinguishes itself from the element-id action siblings (click, set_value, type_text, press_key). An agent can tell exactly what this does versus the other input tools.

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?

Explicitly says the tool is NOT needed for type_text, press_key and element-id actions, and gives the positive selection condition: 'use it only when the app itself must be in front.' That is a clear when/when-not with the competing tools named.

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