Skip to main content
Glama

window_dock

Dock, pin, or unpin windows to screen corners with custom size and always-on-top behavior. Automatically restores minimized windows before docking.

Instructions

Purpose: Decorate a window: pin (always-on-top), unpin, or dock (move + resize + optional pin). Details: action='pin' makes window always-on-top until unpin/duration_ms. action='unpin' removes always-on-top. action='dock' positions to corner with width/height (default 480×360 bottom-right) and optionally pins. Minimized windows are automatically restored before docking. Prefer: Use action='dock' for terminal/CLI window auto-positioning at session start. Use action='pin' alone when you only need always-on-top without moving or resizing. Caveats: Pin survives minimize/restore; explicit action='unpin' needed to release. Dock fails on elevated processes. Dock overrides any existing Win+Arrow snap arrangement. Examples: window_dock({action:'dock', title:'PowerShell', corner:'bottom-right', width:480, height:360}) window_dock({action:'pin', title:'Settings', duration_ms:5000}) window_dock({action:'unpin', title:'Settings'})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction selector — one of: pin, unpin, dock. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional.
titleNoPartial window title (case-insensitive)
duration_msNoAuto-unpin after this many ms (0–60000). Omit to pin indefinitely.
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
cornerNoScreen corner to snap the window to. Default 'bottom-right'.bottom-right
widthNoWindow width in pixels after docking. Default 480.
heightNoWindow height in pixels after docking. Default 360.
pinNoIf true, set always-on-top so the docked window stays visible on top of other windows. Use window_dock(action='unpin') to remove the topmost flag later. Default true.
monitorIdNoMonitor to dock on (from desktop_state({includeScreen:true})). Omit for primary monitor.
marginNoPixel padding between the window and the screen edge. Default 8.
Behavior4/5

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

Discloses important behaviors: pin survives minimize/restore, dock fails on elevated processes, dock overrides Win+Arrow snap, minimized windows restored before docking. Since no annotations are provided, the description carries the full burden, and it does a good job covering key behavioral traits. Lacks mention of return values, but no output schema exists.

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?

Well-structured with clear sections (Purpose, Details, Prefer, Caveats, Examples). Every sentence adds value, and examples cover all three actions. No wasted 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?

Given 10 parameters and no output schema, the description effectively explains the core functionality, defaults, and caveats. It covers the main use cases and limitations. The include parameter is not explained in the description, but its schema description is sufficient. Overall, it's quite complete for a complex 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%, so baseline is 3. The description adds value beyond the schema by explaining inter-parameter dependencies (e.g., dock action's width/height defaults, pin and duration_ms relation) and provides examples that show typical parameter combinations. This enriches understanding.

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: decorate a window by pinning, unpinning, or docking. It distinguishes between the three actions (pin, unpin, dock) and explains what each does, making it easy to select the right action.

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?

Provides explicit guidance: 'Prefer: Use action='dock' for terminal/CLI window auto-positioning at session start. Use action='pin' alone when you only need always-on-top without moving or resizing.' This helps the agent choose the correct usage context. Also includes caveats like dock failing on elevated processes.

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/Harusame64/desktop-touch-mcp'

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