window_dock
Pin, unpin, or dock any Windows app to a screen corner; dock restores minimized windows, resizes, and sets always-on-top for terminal or reference windows.
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 pins it unless pin:false. Minimized windows are automatically restored before docking. The title matches a shown window first; a hidden one (on another virtual desktop, or a minimised packaged app's content) is not docked or pinned — bring it back with focus_window first. 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
| Name | Required | Description | Default |
|---|---|---|---|
| pin | No | If 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. | |
| title | No | 'pin' / 'unpin': Partial window title (case-insensitive) 'dock': Partial window title to dock (case-insensitive). Matches the first shown window containing this text (a minimised one counts; a hidden one — on another virtual desktop, or a minimised packaged app's content — does not). Example: 'Claude Code', 'メモ帳'. | |
| width | No | Window width in pixels after docking. Default 480. | |
| action | Yes | Action 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. | |
| corner | No | Screen corner to snap the window to. Default 'bottom-right'. | bottom-right |
| height | No | Window height in pixels after docking. Default 360. | |
| margin | No | Pixel padding between the window and the screen edge. Default 8. | |
| include | No | Optional 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). | |
| monitorId | No | Monitor to dock on (from desktop_state({includeScreen:true})). Omit for primary monitor. | |
| duration_ms | No | Auto-unpin after this many ms (0–60000). Omit to pin indefinitely. |