Skip to main content
Glama

tool_get_window_rect

Retrieve a window's absolute position, dimensions, and client area size. Get precise layout data for UI automation or window management.

Instructions

Get detailed position and size info for a window: absolute position, dimensions, and client area size. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hwndNo
titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

C2.9/5.0
Behavior2/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. It states 'Read-only,' which is a key safety trait, but it does not disclose other behaviors: what happens if the window is not found, whether hwnd or title is used preferentially, whether the window must be visible, or any error conditions. For a tool with two optional parameters, this is a significant gap.

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 a single, well-structured sentence that front-loads the core purpose and includes the read-only safety note. Every word earns its place; there is no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the output schema exists to explain return values, the description does not cover essential context: how to choose between hwnd and title, what happens if neither is provided (since both have defaults), or whether the tool requires a valid window handle. For a tool with two optional parameters, this is incomplete and could lead to incorrect invocations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description does not explain the parameters at all. It does not clarify that hwnd and title are alternative identifiers, which one takes precedence, or how they interact. The description's mention of 'absolute position, dimensions, and client area size' describes the output, not the input. This leaves the agent guessing how to specify the target window.

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: getting detailed position and size info for a window, including absolute position, dimensions, and client area size. This is a specific verb (get) and resource (window), and it distinguishes from siblings like tool_find_window (which likely finds handles) and tool_capture_window (which captures images). It is unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites (e.g., need a window handle first) or scenarios where this should be preferred over tool_list_windows or tool_find_window. The description is purely declarative without any contextual direction.

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