Skip to main content
Glama

focus_window

Bring a specific window to the foreground by targeting its class, title, or address.

Instructions

Focus a window by selector ("class:firefox", "title:Doc", "address:0x...").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

There are no annotations, so the description carries the burden of disclosing behavior. It implies the tool changes the active window, which is a mutating action (not read-only), but does not state any side effects like changing the user's current focus, potential to steal focus from the application, or whether it requires a visible window. It also doesn't mention what happens if the target is not found.

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?

The description is a single concise sentence that front-loads the action and resource, with selector format inline. It is not overly verbose, and the length is appropriate for the tool's simplicity. Every word adds value, except it could be slightly clearer about the selector syntax.

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?

This is a simple tool with one parameter and an output schema (though its content is not shown). The description explains the core functionality and the selector format, but does not clarify the output (likely void or success status), nor the exact selector syntax. For a simple tool, it is adequate but not complete—missing edge cases like invalid selectors or focus failure behavior.

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 description coverage is 0%, meaning the schema provides no description for the 'target' parameter beyond its type. The main description gives examples of valid selectors ('class:firefox', 'title:Doc', 'address:0x...'), which is helpful, but does not explain the syntax in detail (e.g., how to use wildcards, escaping, multiple criteria). This partial guidance is insufficient for the single required parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to focus a window, using a selector format. It specifies the verb 'Focus' and the resource 'window', and the selector types are given as examples. While it doesn't explicitly distinguish from sibling tools like list_windows or close_window, the purpose is clear enough for a simple operation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention that this tool is for setting focus rather than listing or modifying windows, and there are many window-related siblings. Without a 'when to use' or 'when not to use' note, agents may pick this tool incorrectly.

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