Skip to main content
Glama

focus_window

Bring any window to the foreground by its handle to ensure it receives focus for subsequent screen actions.

Instructions

Bring a window to the foreground (focus it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hwndYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the intended effect without mentioning potential side effects, failure conditions (e.g., if the window is minimized or unresponsive), or whether it requires special permissions. This leaves the agent without knowledge of how the operation might behave beyond the basic action.

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?

The description is a single, well-structured sentence that immediately states the purpose with no redundant words. It is appropriately concise for a simple operation and front-loads the key action.

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

Completeness2/5

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

Given that the tool has a required parameter (hwnd) that is undocumented, and no behavioral details are provided, the description is incomplete. The existence of an output schema (per context) is noted, but the description does not clarify what the tool returns (e.g., success/failure), leaving gaps in the agent's understanding of how to call and interpret the tool.

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

Parameters1/5

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

The sole parameter 'hwnd' has no description in the schema (coverage 0%), and the tool description does not explain it at all. An agent cannot infer that 'hwnd' is a window handle or how to obtain it, making parameter usage opaque. The description fails to compensate for the schema's lack of parameter documentation.

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 'Bring a window to the foreground (focus it)' clearly states the action (bring/focus) on a specific resource (a window), distinguishing it from siblings like close_window or window_children. It is unambiguous and immediately tells an agent what the tool does.

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

Usage Guidelines3/5

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

The description implies the tool is used when you want to focus a window, but it provides no explicit guidance on when to prefer it over alternatives or any exclusions. There is no mention of conditions like 'use only when the window is not already focused' or when to avoid it.

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