Skip to main content
Glama
LukeLamb

claude-linux-mcp

move_window

Destructive

Move or resize a window by specifying its title pattern and optional new coordinates or dimensions. Omitted parameters leave the current value unchanged.

Instructions

Move and/or resize a window matching the given title pattern. Any of x, y, width, height omitted leaves that dimension unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
title_patternYes
xNo
yNo
widthNo
heightNo

Implementation Reference

  • The async function moveWindow(args) – executes the move_window tool logic. Checks for wmctrl, validates title_pattern, then shells out to `wmctrl -r <title> -e 0,x,y,w,h` to move/resize the window.
    async function moveWindow(args) {
      const missing = requireBin('wmctrl');
      if (missing) return errorResult(missing);
      if (!args.title_pattern) return errorResult('title_pattern is required');
      const x = args.x ?? -1;
      const y = args.y ?? -1;
      const w = args.width ?? -1;
      const h = args.height ?? -1;
      const r = await run(BIN.wmctrl, ['-r', args.title_pattern, '-e', `0,${x},${y},${w},${h}`]);
      if (r.code !== 0) return errorResult(`move_window failed: ${r.stderr || r.stdout || 'unknown'}`);
      return textResult({ matched: args.title_pattern, geometry: { x, y, width: w, height: h } });
    }
  • The schema/registration of the move_window tool in the TOOLS array, defining its name, description, annotations, and inputSchema (title_pattern string + optional x/y/width/height numbers).
    {
      name: 'move_window',
      description: 'Move and/or resize a window matching the given title pattern. Any of x, y, width, height omitted leaves that dimension unchanged.',
      annotations: { title: 'Move/resize window', destructiveHint: true },
      inputSchema: {
        type: 'object',
        properties: {
          title_pattern: { type: 'string' },
          x: { type: 'number' },
          y: { type: 'number' },
          width: { type: 'number' },
          height: { type: 'number' },
        },
        required: ['title_pattern'],
      },
    },
  • server.js:557-557 (registration)
    The HANDLERS map that registers the move_window string to the moveWindow function for JSON-RPC dispatch.
    move_window: moveWindow,
Behavior4/5

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

The description adds behavioral context beyond annotations by explaining that omitted dimensions remain unchanged. However, it lacks details on pattern matching behavior and potential side effects.

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 redundancy. Purpose and key behavioral rule are front-loaded and efficiently communicated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description covers core purpose and parameter behavior, it omits information about return values, error cases, and handling of multiple matching windows, making it somewhat incomplete for a 5-parameter tool.

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?

With 0% schema description coverage, the description adds meaning for the optional parameters (omitted leaves unchanged) but does not clarify the title_pattern format or coordinate semantics.

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 action 'Move and/or resize a window' and specifies the resource by 'title pattern', distinguishing it from sibling tools like close_window or focus_window.

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?

The description implies usage for moving/resizing windows but does not provide explicit guidance on when to use this tool over alternatives, nor does it mention prerequisites or conditions.

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/LukeLamb/claude-linux-mcp'

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