Skip to main content
Glama

Focus Window

focus_window

Raise and focus a specific desktop window by window ID or title substring to bring the intended application to the foreground for system or security tasks.

Instructions

Raise and focus a window by id (0x...) or title substring.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "focus_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNo
window_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It states the action but not what happens when a title substring matches several windows, what occurs when a window id is stale, or whether the raise is merely a non-destructive Z-order change versus something more impactful.

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?

A single short sentence that front-loads the action and then the two identification modes. No filler, nothing restating the tool title or name.

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?

An output schema exists, so return values need not be explained. But for a tool with no annotations, no required parameters, and two optional arguments, the description leaves the agent guessing about precedence when both identifiers are passed and about behavior on ambiguous or failed matches.

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 0%, so the description must compensate, and it does add real meaning: window_id is a hex-format id (0x...) and title is a substring match rather than an exact string. However, with zero required parameters it leaves the neither-provided and both-provided cases undefined.

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 names a specific verb pair ("raise and focus") and resource ("a window"), and it explains the two accepted identifiers. That distinguishes it from related siblings such as find_windows_by_title or get_active_window, though it never explicitly contrasts with them.

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?

Usage is only implied: the phrasing "by id (0x...) or title substring" tells the agent that one of the two identifiers is the expected input. There is no explicit when-to-use guidance, no exclusion against search tools like find_windows_by_title, and no statement about prerequisites such as having a window open.

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

Deploy Server

Other Tools