Skip to main content
Glama

Bring the game to the foreground

focus_window

Brings the FiveM game window to the foreground for input and screenshot automation, minimizing other windows if needed and remembering the previous window for later restoration.

Instructions

Restores/minimizes-out if needed and steals foreground (remembering the previous window for restore_focus). Every input/screenshot tool calls this automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag it as a non-read-only, non-idempotent mutation of window state, so the bar is lower; the description adds genuinely useful behavior beyond that by disclosing the foreground steal, the automatic restore/minimize-out step, and that the prior window is remembered for restore_focus. It does not say what happens if the game is not running or if the steal fails.

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?

Two short sentences, front-loaded with the core action and followed by the practical routing note. Every clause earns its place; nothing is redundant with the title or schema.

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 zero-param, no-output-schema tool this covers the essential behavior and the relationship to restore_focus and the input/screenshot family. Minor gaps remain around failure modes (game not launched, no window to focus), but nothing an agent needs to call it correctly is missing.

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?

The tool takes zero parameters and the schema is empty, so there is no parameter semantics to document; baseline 4 applies. The description correctly adds no spurious parameter discussion.

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+resource ('steals foreground') with concrete mechanics (restores/minimizes-out if needed), which cleanly separates it from siblings like restore_focus and window_status. The title reinforces rather than restates, and the parenthetical naming of restore_focus tells the agent how the two tools relate.

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?

'Every input/screenshot tool calls this automatically' is a strong routing signal telling the agent it usually does not need to invoke this manually, and it names restore_focus as the counterpart tool. It stops short of an explicit when/when-not rule (e.g. only call if window_status shows it is not foreground), so it is clear context rather than full exclusions.

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