Skip to main content
Glama

Give focus back to the previous window

restore_focus

Restores focus to the window that was active before the game window gained foreground, so automation can return to prior tasks.

Instructions

Returns foreground to whatever window was focused before this tool focused the game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the agent knows this mutates foreground state. The description adds the stateful dependency on a previously focused window, but does not say what happens if there was no prior window, if the prior window has closed, or whether the call reports success.

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?

A single front-loaded sentence with no filler. The trailing clause 'before this tool focused the game' is slightly muddled since focus_window, not this tool, performs the focusing, but the meaning survives.

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

Completeness4/5

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

For a no-parameter, no-output-schema tool whose annotations carry the safety profile, the description covers the core contract adequately. The main omission is edge-case behavior when no previous window exists, which is minor given the tool's simplicity.

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

Parameters4/5

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

Zero parameters and no schema properties, so there is nothing for the description to disambiguate. Baseline 4 applies; the description correctly avoids inventing parameters.

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?

States a specific verb (returns/restores) and the exact target (the window focused before the game was focused), which is a precise and unusual resource. This implicitly distinguishes it from the sibling focus_window, since the agent can tell this is the undo counterpart rather than a fresh focus request.

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 by the semantics — an agent infers this should be called after focus_window to return the user to their prior application. No explicit when-to-use, when-not-to-use, or named alternative (focus_window is not mentioned by name).

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