Skip to main content
Glama

Get Active Window

get_active_window

Retrieve the focused X11 window's ID, title, and geometry to identify the active application during desktop automation or security assessment.

Instructions

The currently focused window (id, title, geometry). X11 only.

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": "get_active_window"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses the important environment constraint (X11 only) and implies a read-only snapshot by returning current state, but does not say what happens on Wayland (error, null, or empty result) or whether the call has any side effects such as raising the window.

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?

Two short clauses, zero waste, and the platform constraint is front-loaded where it matters. It is slightly telegraphic (a bare noun phrase plus a fragment) rather than a clean sentence, which is the only deduction.

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?

An output schema exists, so return value detail is already covered, and the description supplies the one piece of context the schema cannot: the X11-only limitation. For a trivial zero-parameter getter this is nearly complete, with only the Wayland failure mode left unstated.

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, so the schema has nothing to document and the description correctly adds no parameter talk. Baseline 4 applies for a parameterless tool with no ambiguity about invocation.

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 the exact resource retrieved (the currently focused window) and enumerates the returned fields (id, title, geometry), making it clearly distinguishable from the manipulation siblings such as focus_window and move_window. It is a noun phrase rather than a verb+resource statement, which keeps it just short of a 5.

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?

No explicit when-to-use or when-not-to-use guidance, and no alternatives are named. The 'X11 only' clause does function as an implicit precondition that tells the agent this is unusable on Wayland, which is more than nothing but far from full routing guidance.

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