Skip to main content
Glama

focus_app

Bring an application to the front by name, launching it if not running, to make it active for interaction. Ensures the app is focusable before you click or observe.

Instructions

Bring an application to the front by its name (e.g. 'System Settings', 'Safari'), launching it if it is not already running, and reopening a window if it is running with none. Use before observing or acting on an app you are not sure is frontmost. The name is matched case-insensitively against running apps: exact name first, then a unique prefix or substring, so 'Telegram' finds 'Telegram Lite'. The reply is 'focused ""' only after the app is confirmed frontmost; otherwise it explains what went wrong (ambiguous name — with the candidates listed, no such app, launch failed, or activation not confirmed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and does so well: launch-on-demand, window reopening, case-insensitive matching with exact-then-substring precedence, and the precise success/error reply contract including ambiguous-name candidate listing and unconfirmed activation. This is exactly the behavioral detail an agent needs before invoking a state-changing tool.

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 dense sentences, front-loaded with the action and matching/return semantics, with the error enumeration deferred to the end. No sentence is filler; every clause conveys a distinct behavior or constraint.

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

Completeness5/5

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

The tool has one required parameter, an output schema, and no annotations, and the description covers activation behavior, matching rules, and the reply contract. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it explains that app_name is matched case-insensitively, resolved exact-first then by unique prefix or substring, and gives concrete examples ('System Settings', 'Safari', 'Telegram' → 'Telegram Lite'). This is meaning well beyond the bare string type.

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 states a specific verb and resource ('Bring an application to the front by its name') along with the side effects (launch if not running, reopen a window if none). An agent can immediately distinguish this activation tool from read-oriented siblings like observe and probe_tooltips.

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?

It gives an explicit trigger condition: 'Use before observing or acting on an app you are not sure is frontmost,' which links it to the observe/act workflow. It does not name a when-not case or an alternative tool for the already-frontmost situation, so it stops short of full alternative routing.

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