Skip to main content
Glama

snap_window

Positions a window into a named or numbered snap zone on its monitor, using the zone set for that screen. Returns a clear error if the zone isn't found.

Instructions

Drop one window into a zone of the snap-zone set assigned to that monitor, by number or by name. The numbers are the ones Plonk draws on the zones while a window is dragged, so 'the middle zone' of a three-zone set is 2; a name is whatever the set calls a zone ('chat'), listed per zone in get_state.zone_sets, matched ignoring case. Fails with the zones that screen does have, names included, when neither matches. Zone sets and their per-monitor assignment are in get_state; use apply_layout instead when the user describes a size rather than a zone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesApp name to match, e.g. 'Visual Studio Code'
zoneYes1-based zone number as shown on the drag overlay, or the zone's name from get_state.zone_sets
titleNoOnly windows whose title contains this substring
screenNoMonitor index; defaults to the one the window is on

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.3
    • addedInput schema / properties / zone / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / zone / description
      Previous value: -"1-based zone number, as shown on the drag overlay"New value: +"1-based zone number as shown on the drag overlay, or the zone's name from get_state.zone_sets"
    • removedInput schema / properties / zone / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / zone / minimum
      Removed value: -1
    • removedInput schema / properties / zone / type
      Removed value: -"integer"
  2. Changed4 schema fields changedv0.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / screen / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / screen / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / zone / maximum
      Added value: +9007199254740991
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses case-insensitive name matching, the meaning of zone numbers, and the failure behavior when neither number nor name matches. It does not fully spell out side effects or reversibility, but the action is inherently clear from 'Drop one window.'

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?

Every sentence earns its place: the main action is front-loaded, then zone-number mechanics, name resolution, failure behavior, and the sibling alternative follow in logical order. There is no filler or repetition of schema content.

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 four parameters, no output schema, and no annotations, the description is complete enough to call it correctly: it covers identification, zone resolution, error behavior, and when to use another tool. No critical gap remains.

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?

The schema already documents all four parameters with high coverage, so the baseline is 3. The description adds real value by explaining how zone numbers relate to the drag overlay, how names come from get_state.zone_sets, and that matching is case-insensitive — this goes beyond the schema's one-line parameter 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 states a specific action ('Drop one window into a zone') and the exact resource (zoned layout of the snap-zone set assigned to the monitor). It distinguishes itself from apply_layout by explicitly saying 'use apply_layout instead when the user describes a size rather than a zone.'

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?

It clearly names the alternative tool (apply_layout) and the exact condition for choosing it. It also tells the agent where to find zone sets and per-monitor assignment (get_state), which is directly actionable.

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