Skip to main content
Glama
kuhyx

i3wm-mcp

by kuhyx

i3wm-mcp

A Model Context Protocol server for the i3 window manager (and, via the shared IPC, Sway). It lets an MCP client — Claude Code, Claude Desktop, the MCP Inspector — query and drive your i3/Sway session through a small set of well-described tools.

The tool definitions are deliberately tuned for a high Glama tool-definition-quality score: a consolidated, non-overlapping tool set, every parameter described, typed output schemas, and honest readOnlyHint/destructiveHint annotations.

Derived from caninja/i3wm-mcp (MIT). See ATTRIBUTION.md. This rewrite migrates the transport from the i3-msg CLI to the async i3ipc library, consolidates 43 tools into 13, and adds tests, CI, and output schemas.

Tools

Tool

Kind

What it does

get_tree

read

List windows from the layout tree, with filters.

get_focused

read

Details of the currently focused window.

list_workspaces

read

All active workspaces.

list_outputs

read

All display outputs (monitors).

get_config

read

Version + config + binding modes snapshot.

focus_window

mutate

Focus by direction / criteria / layer / parent-child.

move_window

mutate

Move a container to a direction / workspace / output / scratchpad / center.

manage_workspace

mutate

Switch / move-to / rename / navigate workspaces.

set_layout

mutate

Container layout, split orientation, border style.

toggle_window_state

mutate

Toggle floating / fullscreen / sticky.

exec_application

destructive

Launch a program via i3 exec (arbitrary code).

run_command

destructive

Raw i3/Sway command escape hatch (marks, gaps, bar, reload/restart).

kill_window

destructive

Close the focused or a matched window.

Rarely-used verbs (marks, i3-gaps, i3bar, scratchpad show/hide, reload, restart, and deliberately exit) are reached through run_command rather than dedicated tools, keeping the set small and distinct.

Related MCP server: Tmux MCP Server

Requirements

  • A running i3 (≥4.x) or Sway session.

  • Python ≥ 3.10.

The server locates the i3/Sway IPC socket from the environment, so it must be launched from within your graphical session (it needs DISPLAY, or SWAYSOCK/I3SOCK, in its environment). Clients that spawn it from inside the session — Claude Code, the MCP Inspector — inherit this automatically; a headless or systemd launch would need those variables passed explicitly.

Install

git clone https://github.com/kuhyx/i3wm-mcp
cd i3wm-mcp
python -m venv .venv
./.venv/bin/python -m pip install -e ".[dev]"

Run

./.venv/bin/python -m i3wm_mcp        # stdio transport

Register with Claude Code

claude mcp add i3wm -- /absolute/path/to/i3wm-mcp/.venv/bin/python -m i3wm_mcp

Inspect the tool definitions

npx @modelcontextprotocol/inspector ./.venv/bin/python -m i3wm_mcp

Develop

./.venv/bin/python -m pytest        # tests + 100% coverage gate
./.venv/bin/ruff check . && ./.venv/bin/ruff format --check .
./.venv/bin/mypy src
./.venv/bin/python scripts/rubric_check.py   # local TDQS proxy check

Safety

Read tools have no side effects. Mutation tools are reversible. The three destructive tools (exec_application, run_command, kill_window) can run arbitrary commands, close applications, or — via run_command — restart or exit the session; treat them accordingly and never feed them untrusted input.

License

MIT — see LICENSE.

Available Tools

12 tools
exec_applicationLaunch Application (i3 exec)A
Destructive

Launch an external program via i3's exec. DESTRUCTIVE / open-world: runs an arbitrary command line on the user's machine with their privileges — never pass untrusted input. Set no_startup_id=true for programs without startup-notification support (avoids a lingering busy cursor). For built-in i3 verbs use the dedicated tools instead — focus_window, move_window, set_layout — not this.

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesThe shell command line to launch.
no_startup_idNoPass i3's --no-startup-id flag. Default false.

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already mark as destructive and open-world. Description adds important context: 'runs an arbitrary command line on the user's machine with their privileges — never pass untrusted input.' Also explains behavior of no_startup_id flag.

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?

Three sentences with no redundancy: purpose, warning, and usage guidance for parameter and siblings. Every sentence earns its place.

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?

Covers all needed context given annotations (destructive, open-world), schema (100% coverage, 2 parameters), and existence of output schema. Includes security warning and sibling differentiation.

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?

Schema coverage is 100% so baseline is 3. Description adds practical guidance for no_startup_id: 'Set for programs without startup-notification support (avoids a lingering busy cursor).' This adds value beyond schema.

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?

Description clearly states 'Launch an external program via i3's exec' with specific verb and resource, and explicitly distinguishes from sibling tools like focus_window, move_window, set_layout.

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?

Explicitly states when to use (launching external programs), when not to use (for built-in i3 verbs), and provides security warning about untrusted input. Explains no_startup_id flag usage.

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

focus_windowFocus i3 WindowA
Idempotent

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.

ParametersJSON 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

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.8/5.0
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.

get_configInspect i3 ConfigurationA
Read-onlyIdempotent

Inspect i3/Sway configuration state in one call: version, whether the compositor is Sway, the loaded config path and (optionally) its full text, plus configured and active binding modes. Read-only. Set include_config_text=false to skip the potentially large config body. This is the only config-introspection tool; live layout comes from get_tree.

ParametersJSON Schema
NameRequiredDescriptionDefault
include_config_textNoInclude the full config file text (can be large). Default true.

Output Schema

ParametersJSON Schema
NameRequiredDescription
is_swayYesTrue when the running compositor identifies as Sway.
versionYesHuman-readable i3/Sway version, e.g. '4.25.1'.
config_textNoFull text of the loaded config, or null when not requested.
binding_modesNoNames of all configured binding modes.
loaded_config_pathNoPath of the loaded config file, if reported.
active_binding_modeNoCurrently active binding mode name, or null if unsupported by the WM.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint. The description adds value by warning about the potentially large config body and explicitly stating 'Read-only'. No contradiction with 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?

Three sentences, front-loaded with main purpose, then details, then sibling distinction. No wasted words, every sentence adds value.

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 simple tool (one optional param, output schema exists), the description covers returned fields, parameter guidance, and sibling context. No gaps.

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?

Schema coverage is 100% with one parameter described. The description adds practical guidance on when to set include_config_text=false to skip large config body, enhancing the schema's 'can be large' note.

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 tool inspects i3/Sway configuration state, listing specific fields (version, compositor, config path, config text, binding modes). It explicitly distinguishes itself from siblings by stating it's the only config-introspection tool and directing users to get_tree for live layout.

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 (config introspection) and when not to include config text (set include_config_text=false to skip large body). It also names the alternative get_tree for live layout, fulfilling both when-to-use and when-not-to-use.

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

get_treeQuery i3 Layout TreeA
Read-onlyIdempotent

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).

ParametersJSON 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

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.5/5.0
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.

kill_windowClose i3 WindowA
Destructive

Close a window — the focused one, or one matched by class/title/instance/mark/con_id. DESTRUCTIVE: the target application is asked to quit and may discard unsaved work; there is no undo, and matching several windows closes all of them. To move a window out of the way instead of closing it, use move_window (e.g. to the scratchpad).

ParametersJSON Schema
NameRequiredDescriptionDefault
markNoClose the window carrying this mark (criteria).
titleNoClose windows whose title matches (criteria).
con_idNoClose the container with this exact i3 id (criteria).
instanceNoClose windows whose WM_CLASS instance matches (criteria).
window_classNoClose windows whose X11 class matches (criteria).

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (destructiveHint=true), the description details that the target application is asked to quit, unsaved work may be discarded, no undo, and matching several windows closes all. This adds significant context.

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 sentences: first states purpose, second provides behavioral warning and alternative. Every sentence earns its place, no redundancy.

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?

For a tool with 5 optional criteria parameters, destructive behavior, and an output schema (not shown but indicated), the description covers purpose, criteria, destructive consequences, and alternative usage. No gaps.

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?

Schema coverage is 100%, so baseline is 3. However, the description adds value by listing the criteria types (class, title, instance, mark, con_id) and implying they are for matching, which reinforces and slightly expands on the 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 explicitly states 'Close a window — the focused one, or one matched by class/title/instance/mark/con_id'. It uses a specific verb ('Close') and resource ('window'), and distinguishes from sibling `move_window` by mentioning the destructive nature and alternative.

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 clear guidance: use to close windows, not to move them out of the way (referencing `move_window`). It also warns about destructiveness and multiple windows matching.

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

list_outputsList i3 OutputsA
Read-onlyIdempotent

List display outputs (monitors): name, active/primary state, current workspace and geometry. Read-only. Use before moving windows or workspaces between monitors with move_window or manage_workspace; for the workspaces themselves use list_workspaces.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesNumber of outputs reported.
outputsYesOutputs, in i3 order.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, not destructive. Description adds detail on returned fields and confirms read-only nature, providing slight additional value.

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 sentences, no wasted words, front-loaded with core purpose.

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 zero parameters and good annotations, the description fully covers what the tool does and when to use it. Output schema exists, so return values are documented elsewhere.

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?

No parameters, baseline is 4. Description mentions return fields, no further semantic explanation needed.

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?

Clearly states it lists display outputs with specific fields (name, state, workspace, geometry). Distinguishes from sibling tools by mentioning alternatives.

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?

Explicitly advises using before moving windows/workspaces between monitors, and directs to list_workspaces for workspace listing.

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

list_workspacesList i3 WorkspacesA
Read-onlyIdempotent

List all active workspaces with number, name, visibility, focus, urgency and owning output. Read-only. Use this for navigation decisions; for the windows on a workspace use get_tree with a workspace filter, and for monitors use list_outputs.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesNumber of active workspaces.
workspacesYesActive workspaces, in i3 order.

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds 'Read-only' which is consistent but doesn't disclose additional behavioral traits beyond the annotations. Minimal added value.

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 concise sentences: first covers the action and output, second provides usage context and sibling differentiation. No redundancy or extraneous text.

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 zero parameters and the presence of an output schema, the description fully covers the tool's purpose, usage, and relationship to siblings. No gaps remain.

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?

Tool has zero parameters, and schema describes them (vacuously). Baseline 4 per rubric: '0 params = baseline 4'. Description doesn't need to add param details.

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 'List all active workspaces' and enumerates the specific fields returned. It distinguishes this tool from siblings by contrasting with get_tree and list_outputs.

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?

Explicitly says 'Use this for navigation decisions' and provides concrete alternatives: 'for windows on a workspace use get_tree... for monitors use list_outputs'. This is exemplary guidance.

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

manage_workspaceManage i3 WorkspaceA

Act on workspaces: switch to one, move_container_to one (optionally following), rename one, or navigate next/prev/back_and_forth. Reversible. action selects the operation and determines which of name/new_name/direction are required. To move a single window rather than switch, use move_window; to list workspaces use list_workspaces.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoTarget workspace for switch/move_container_to; old name for rename.
actionYesWhich workspace operation to perform.
followNoFor move_container_to, also switch to the target. Default false.
new_nameNoNew workspace name (required for `rename`).
directionNoNavigation direction (required for `navigate`).

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A5/5.0
Behavior5/5

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

The description discloses that the operation is reversible, adding behavioral context beyond the annotations. Annotations indicate a mutation (readOnlyHint=false) but not destructive, and the description aligns with that.

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 (two sentences) yet comprehensive. It front-loads the core actions, then adds details about reversibility and parameter dependencies, followed by sibling tool references. No wasted words.

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 tool's complexity (multiple actions with parameter dependencies) and the presence of an output schema, the description is complete. It covers all necessary behavioral and usage aspects without gaps.

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?

Even with 100% schema description coverage, the description adds significant value by explaining how the action parameter determines which other parameters are required. This is not evident from the schema alone.

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 tool's purpose: acting on workspaces with specific actions (switch, move_container_to, rename, navigate). It uses specific verbs and resources, and distinguishes from sibling tools like move_window and list_workspaces.

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 each action and which parameters are required. It also suggests alternatives for other tasks (e.g., move_window for moving a single window, list_workspaces for listing).

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

move_windowMove i3 WindowA

Move the focused container (or one matched by class/title/instance/mark/con_id) to exactly one destination: a direction (with pixel amount), a workspace, an output, the scratchpad, or a screen position (center). Reversible; returns per-command success. To change focus rather than move, use focus_window; to move whole workspaces between monitors, use manage_workspace.

ParametersJSON Schema
NameRequiredDescriptionDefault
markNoSelect the window to move by mark (criteria).
titleNoSelect the window to move by title (criteria).
con_idNoSelect the window to move by exact i3 id (criteria).
instanceNoSelect the window to move by WM_CLASS instance (criteria).
amount_pxNoPixels to move when `direction` is set. Default 10.
directionNoMove the container this direction.
to_centerNoCenter a floating container on its output. Default false.
to_outputNoMove the container to this output, e.g. 'HDMI-1'.
to_workspaceNoMove the container to this workspace (name or number).
window_classNoSelect the window to move by X11 class (criteria).
to_scratchpadNoMove the container to the scratchpad. Default false.

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.4/5.0
Behavior4/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=false), the description adds 'Reversible; returns per-command success.' This discloses reversibility and return format, though it doesn't detail side effects or auth requirements.

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?

Three sentences with clear front-loading: purpose first, then constraint, then sibling differentiation. No extraneous words.

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 tool with 11 parameters, 0 required, 100% schema coverage, and output schema, the description covers destination types, selection options, reversibility, and sibling tools. Missing clarification on criteria combination, but adequate.

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?

Schema description coverage is 100%, so baseline is 3. The description adds the constraint 'exactly one destination' but doesn't elaborate on parameter formats or interactions beyond the schema.

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 tool moves a container, specifies selection options (class/title/instance/mark/con_id), and lists possible destinations (direction, workspace, output, scratchpad, screen center). It distinguishes from sibling tools focus_window and manage_workspace.

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?

Explicitly tells when to use this tool vs alternatives: 'To change *focus* rather than move, use focus_window; to move whole workspaces between monitors, use manage_workspace.' Also notes 'exactly one destination' to avoid conflicting parameters.

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

run_commandRun Raw i3 CommandA
Destructive

Run a raw i3/Sway command string — the escape hatch for operations without a dedicated tool: marks (mark/unmark), i3-gaps (gaps ...), i3bar (bar ...), scratchpad show/hide, and reload/restart. DESTRUCTIVE / open-world: the payload is unrestricted and CAN include kill, restart, reload, or exit (which logs the user out), so validate before sending. Prefer the typed tools (focus_window, move_window, set_layout, ...) whenever one fits.

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesRaw i3/Sway command payload to send.

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already indicate destructiveHint=true and openWorldHint=true. The description adds specific destructive examples (kill, restart, reload, exit) and a validation caveat, providing context beyond the annotations without contradiction.

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 sentences with a list of examples, front-loaded with purpose. No unnecessary words; every sentence adds value.

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?

Given an output schema exists (not detailed but present), the description covers purpose, usage, and warnings adequately. Slight gap: no mention of error handling or return format, but not critical for a raw command tool.

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?

Schema coverage is 100% for the single parameter 'command'. The description adds value by giving concrete examples of acceptable commands (marks, gaps, etc.), going beyond the schema's generic description.

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 tool's purpose: running raw i3/Sway commands as an escape hatch. It lists specific use cases (marks, gaps, bar, scratchpad, reload/restart) and distinguishes from sibling tools by advising to prefer typed tools when available.

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?

Explicit guidance on when to use (operations without dedicated tool) and when not to (prefer typed tools like focus_window). Also includes explicit warning about destructive nature and advising validation.

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

set_layoutSet i3 LayoutA

Set how the focused container arranges children: container layout (stacking/tabbed/split*), the split orientation for the next window, and/or the border style. Reversible. Provide at least one of layout/split/border; border_width applies only to the pixel border. For floating/fullscreen/sticky state use toggle_window_state.

ParametersJSON Schema
NameRequiredDescriptionDefault
splitNoSplit orientation for the next new window.
borderNoBorder style for the focused window.
layoutNoContainer layout to apply to the focused node.
border_widthNoBorder width in px; used only with border='pixel'.

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, but the description adds 'Reversible', which is important behavioral context. It also clarifies that 'border_width applies only to the pixel border', providing edge-case behavior beyond the schema.

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 well-structured sentences with all essential information front-loaded. Every sentence adds value without redundancy.

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 full schema coverage and presence of an output schema (as per context signals), the description covers all needed context: what the tool does, usage prerequisites, behavioral notes, and cross-reference to a sibling tool for other functionalities.

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?

Schema coverage is 100%, but the description adds semantic value by specifying that at least one of layout/split/border is required (schema allows all null) and that border_width is conditional on border='pixel'. This helps the agent form valid invocations.

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 ('set') and the resource ('focused container layout, split, border'). It distinguishes from the sibling tool 'toggle_window_state' by directing to it for floating/fullscreen/sticky states, ensuring the agent can differentiate.

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?

Explicitly says 'Provide at least one of layout/split/border', giving a clear requirement for parameter selection. Also tells when not to use this tool by referencing 'toggle_window_state' for other window states.

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

toggle_window_stateToggle i3 Window StateA

Enable, disable, or toggle one boolean window state — floating, fullscreen, or sticky — on the focused window. Reversible. Omit enable to toggle, or set it true/false to force. fullscreen_scope picks per-output ('normal') vs across-all ('global'). For layout/border changes use set_layout.

ParametersJSON Schema
NameRequiredDescriptionDefault
stateYesWhich boolean window state to change.
enableNotrue=enable, false=disable, omitted=toggle.
fullscreen_scopeNoFullscreen scope when state='fullscreen'. Default 'normal'.normal

Output Schema

ParametersJSON Schema
NameRequiredDescription
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.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations are all false and provide minimal information, but the description compensates by stating the operation is reversible and explaining the behavior of enable and fullscreen_scope. It does not mention any side effects, but given the tool's nature, this is sufficient.

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 very concise—three sentences with no wasted words. It front-loads the purpose and quickly covers usage details and alternatives.

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 tool's moderate complexity (3 params, all documented in schema, and an output schema exists), the description provides complete guidance on how to use each parameter and when to use an alternative tool. No gaps.

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?

Schema coverage is 100% (baseline 3), and the description adds value by clarifying the enable parameter's toggle vs force behavior and the fullscreen_scope meaning (per-output vs across-all). This goes beyond the 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 tool's action: toggle boolean window states (floating, fullscreen, sticky) on the focused window. It distinguishes itself from sibling tool set_layout, which handles layout/border changes.

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?

Explicitly provides when to use (for boolean window states) and when not to (for layout/border, use set_layout). Also explains the toggle behavior and parameter usage (omit enable to toggle, set true/false to force).

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 12 tool updatesv0.1.0
    • First observedexec_application
    • First observedfocus_window
    • First observedget_config
    • First observedget_tree
    • First observedkill_window
    • First observedlist_outputs
    • First observedlist_workspaces
    • First observedmanage_workspace
    • First observedmove_window
    • First observedrun_command
    • First observedset_layout
    • First observedtoggle_window_state

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a distinct purpose: inspecting state (get_tree/list_workspaces/list_outputs/get_config), navigating/focusing (focus_window), moving (move_window/kill_window), workspace management (manage_workspace), layout changes (set_layout/toggle_window_state), and execution (exec_application/run_command). Overlap is minimal and well-documented.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, e.g., get_tree, list_workspaces, focus_window, toggle_window_state. No mixing of conventions.

Tool Count5/5

With 12 tools, the scope is well-balanced for an i3/Sway MCP server. It covers essential operations without being bloated or sparse.

Completeness4/5

The tool set covers most common i3 actions including tree queries, focus, move, workspace management, layout changes, and execution. Minor gaps exist for operations like marks and scratchpad control, but these are accessible via run_command.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage local tmux sessions, including creating and controlling sessions, windows, and panes, sending commands, and capturing terminal output.
    16
    17
    Do What The F*ck You Want To Public
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables interaction with the FVWM3 window manager for configuration generation, window management, and debugging. Provides access to config files, runtime state, and control tools for managing desktops, monitors, and tiling operations.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Allows AI assistants to create, manage, and interact with tmux sessions, windows, and panes programmatically.
    19
    MIT

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