Skip to main content
Glama

pir_define_window

Define a named window region that tracks a moving window by looking up its geometry before each capture, with window-local masks for targeted monitoring.

Instructions

Watch a window rather than a fixed rectangle: geometry is looked up from the window id before every capture, so the region follows the window when it moves. A resize counts as maximal change. Masks are window-local. The id is whatever your window-geometry command understands (a Hyprland address like 0x5f3a..., an X11 window id).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
masksNo
windowYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It reveals several important behaviors beyond the schema: window geometry is re-looked-up per capture, resizes count as maximal change, masks are window-local, and the accepted id formats are described. This is substantial and genuinely helpful.

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?

Three sentences with no filler. The core behavioral distinction is front-loaded, and the id-format detail is placed at the end as useful supplementary information. Every sentence earns its place.

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 no annotations and no output schema, the description does a good job covering the key behavior and the window-id formats. Minor gaps remain: the `name` parameter is not defined, and mask coordinate semantics could be more explicit. These are inferable but not fully spelled out.

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?

Schema description coverage is 0%, so the description must compensate. It does explain the meaning of `window` well and adds that masks are window-local. However, the required `name` parameter is left unexplained, and the exact coordinate system of the masks (origin relative to window) is only implied by 'window-local'. Partial compensation, not complete.

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 begins with a specific verb and resource: 'Watch a window rather than a fixed rectangle.' It clearly states that geometry is looked up from the window id before every capture, and it explicitly contrasts this with fixed rectangles, distinguishing it from the sibling pir_define_region.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: when the region should follow a moving window rather than stay fixed. It also explains what window identifiers are accepted. It does not explicitly name sibling alternatives or state when not to use it, but the contrast with 'fixed rectangle' implies the boundary adequately.

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