Skip to main content
Glama

window_dock

Dock a window to a screen corner with optional always-on-top pinning, or pin/unpin a window to stay on top. 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.
Behavior5/5

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

With no annotations provided, the description fully covers behavioral traits: pin behavior (survives minimize, requires explicit unpin), dock's restoration of minimized windows, failure on elevated processes, and override of Win+Arrow snap. This is thorough and accurate.

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 well-organized with sections (Purpose, Details, Prefer, Caveats, Examples). It front-loads purpose and details, uses bullet-like phrasing, and every sentence contributes meaning. No redundant or missing 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 tool's complexity (10 parameters, 3 actions) and lack of output schema, the description covers all necessary context: default behaviors, edge cases (elevated processes, minimized windows), and usage scenarios. The examples solidify understanding. No gaps identified.

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 by explaining per-action required fields, providing defaults for corner/width/height/pin/margin, and including concrete examples. This enhances understanding beyond the schema's structured fields.

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 opens with 'Decorate a window: pin (always-on-top), unpin, or dock (move + resize + optional pin)', clearly stating the tool's three distinct actions. It distinguishes well from sibling tools like focus_window or desktop_state, which serve different purposes.

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 'Prefer' section explicitly guides agents on when to use each action: 'dock' for terminal/CLI auto-positioning, 'pin' alone for always-on-top without moving/resizing. Caveats about elevated processes and snap override further clarify when to avoid the tool.

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