Skip to main content
Glama
kuhyx

i3wm-mcp

Focus i3 Window

focus_window
Idempotent

Focus a window using direction, criteria (class, title, instance, mark, or con_id), parent/child container, floating/tiling layer, or output. Reversible.

Instructions

Move keyboard focus, selected by exactly one of: a direction; a specific window (class/title/instance/mark/con_id criteria); the parent/child container; the floating/tiling layer; or an output. Reversible. Supplying none or several selectors is rejected. To move the focused window instead of focusing, use move_window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markNoFocus the window carrying this mark (criteria).
layerNoFocus the floating layer, the tiling layer, or toggle between them.
titleNoFocus a window whose title matches (criteria).
con_idNoFocus the container with this exact i3 id (criteria).
targetNoFocus the parent or child container of the current focus.
instanceNoFocus a window whose WM_CLASS instance matches (criteria).
directionNoFocus the neighbour in this direction.
window_classNoFocus a window whose X11 class matches (criteria).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoFirst error message across the payload, or null on full success.
successYesTrue only if every command in the payload succeeded.
outcomesNoPer-command outcomes, in payload order.
Behavior4/5

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

The description adds value beyond annotations by stating the tool is reversible (consistent with idempotentHint=true and destructiveHint=false) and by explaining the rejection of invalid selector combinations. However, it could briefly mention that only focus is affected, not window position.

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 three sentences with no fluff: main purpose and selection options, reversibility, and important constraint/alternative. Front-loaded with key information.

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?

Given the complexity of 8 parameters and multiple selection methods, the description covers core behavior, constraints, and alternatives. Output schema exists, so omission of return value details is acceptable.

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?

Although schema coverage is 100%, the description groups parameters into categories (direction, criteria, parent/child, layer, output) and clarifies mutual exclusivity, which is essential semantics not present in individual schema descriptions.

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 clearly states the verb 'Move keyboard focus' and the resource (i3 window), and distinguishes from sibling `move_window` by specifying that this tool focuses, not moves. It also explains the selection mechanism and the constraint of exactly one selector.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly names the alternative `move_window` for moving instead of focusing, and warns that supplying none or several selectors is rejected. This provides clear when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kuhyx/i3wm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server