Skip to main content
Glama
kuhyx

i3wm-mcp

Query i3 Layout Tree

get_tree
Read-onlyIdempotent

List application windows from i3/Sway layout tree, filtered by class, title, workspace, or state. Returns window IDs for focus, move, or kill actions.

Instructions

List application windows from the i3/Sway layout tree, optionally filtered by class, title, instance, role, workspace, or floating/urgent state. Read-only. Returns matched leaf windows with their ids, marks and location; use a returned id as con_id in focus_window/move_window/kill_window. For only the active window use get_focused; for a flat workspace summary use list_workspaces; for monitors use list_outputs. Capped at 200 windows (truncated flags the cap).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoCase-insensitive regex on the X11 window role.
titleNoCase-insensitive regex on the window title/name.
urgentNoIf set, keep only windows with the urgency hint = value.
floatingNoIf set, keep only floating (true) or tiled (false).
instanceNoCase-insensitive regex on the X11 WM_CLASS instance.
workspaceNoCase-insensitive regex on the owning workspace name.
window_classNoCase-insensitive regex on the window's X11 class.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of windows matching the requested filters.
windowsYesMatching leaf windows, in tree order.
truncatedNoTrue if the result was trimmed to stay under the size limit.
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds the cap of 200 windows with a truncated flag and that it returns leaf windows with ids, marks, and location, providing useful behavioral context beyond annotations.

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 concise: five sentences that front-load the main purpose, list filters, provide usage guidance, and mention the cap. No redundant 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 presence of an output schema and rich annotations, the description covers all necessary aspects: return value details (leaf windows with ids, marks, location), usage of id in other tools, and the cap. It is complete for the tool's complexity.

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?

The input schema has 100% description coverage, with each parameter having a clear description. The tool description does not add additional semantic detail beyond listing the filter options, so baseline score of 3 is appropriate.

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 it lists application windows from the i3/Sway layout tree with optional filters. It distinguishes itself from siblings like get_focused, list_workspaces, and list_outputs by naming them explicitly.

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 provides explicit guidance on when to use this tool (listing windows from the layout tree) and when to use alternatives (get_focused for active window, list_workspaces for workspace summary, list_outputs for monitors). It also explains how to use the returned id with other tools.

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