Skip to main content
Glama

Computer Focus Window

computer_focus_window

Focus the first visible top-level window whose title contains a given substring, so later keyboard actions go to that window; returns the exact title or 'not found'.

Instructions

Bring the first visible top-level window whose title contains title_substring (case-insensitive) to the foreground. Returns the exact title focused or 'not found'. Keyboard actions land there afterward.

Input Schema

NameRequiredDescriptionDefault
title_substringYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses matching semantics, what is returned on success or failure, and the effect on subsequent keyboard actions. It does not cover edge cases such as multiple matching windows or minimized windows, so it is strong but not exhaustive.

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 front-loaded with the action, then the matching behavior, then the return value and keyboard consequence. Every sentence adds useful information with no repetition or filler.

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?

Although an output schema exists, the description still clarifies the key return behavior by stating that the exact focused title or 'not found' is returned. For a one-parameter focus tool with no annotations, it provides sufficient context to call the tool correctly.

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 define the single parameter, and it does: title_substring is matched against the window title with case-insensitive substring semantics. It also establishes scope by selecting the first visible top-level matching window.

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 the first visible top-level window whose title contains title_substring to the foreground. It is clearly distinct from the sibling tools such as click, type, and screenshot.

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?

The description gives clear usage context by saying keyboard actions land in the focused window afterward, implying it should be used before keyboard input. It does not explicitly name alternatives or exclusions, but no sibling appears to provide competing focus behavior.

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