Skip to main content
Glama

scene_describe

Converts a window into text with element names, coordinates, and a text digest, enabling reliable UI interaction when accessibility trees or visual inspection are unavailable.

Instructions

Describe a window as text: elements with names and coordinates plus a text digest. Use it when the target has no usable accessibility tree (Electron / canvas apps) or when you cannot look at a picture. Every bbox/center is window-relative physical pixels in the grid window.size describes, so a center is a valid click point inside the window; the text digest prints the window's screen origin (@x,y), so absolute = origin + center, added once. source=uia reads the accessibility tree only and never runs OCR; source=ocr reads pixels only; auto blends both. capture.verified=false means the frame could not be proven to be this window, so its OCR and OpenCV results were suppressed; a failed read carries error_code and reason (INVALID_SOURCE, INVALID_REGION, CAPTURE_FAILED, OCR_UNAVAILABLE, UIA_EMPTY, SCENE_FILTERED_EMPTY, UNVERIFIED_FRAME). Read-only: it never clicks or types, and the window may sit behind other windows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hwnd": "<hwnd>"
    },
    "name": "scene_describe"
  }
}

Input Schema

NameRequiredDescriptionDefault
hwndYes
sourceNouia = accessibility tree only: no OCR, no capture, no OpenCV shapesauto
max_itemsNo
include_shapesNoalso report controls that carry no text; needs a pixel tier (auto/ocr), since source=uia reads no pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does it well: it declares read-only behavior ('it never clicks or types'), notes the window may be occluded, explains capture.verified=false suppression semantics, and enumerates error_code values. The coordinate/origin arithmetic ('absolute = origin + center, added once') is genuinely actionable context absent from structured fields.

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?

Dense but front-loaded: purpose and use condition come first, then coordinate semantics, then source tiers, then failure handling. Every sentence carries information an agent needs, and nothing is redundant padding.

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 four-parameter read tool with no output schema and no annotations, the description covers output shape (elements, coordinates, digest), coordinate frame and origin math, mode selection, verification failure, and error codes. An agent can call it and interpret the response without further documentation.

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 only 50%, so the description must compensate, and it does for source (uia = tree only, no OCR/capture; ocr = pixels only; auto = blend) and implicitly for include_shapes via 'needs a pixel tier'. It says nothing about hwnd (how to obtain the handle) or max_items, leaving two undocumented parameters unexplained.

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?

Names a specific verb and resource ('Describe a window as text') and states exactly what the output contains: elements with names and coordinates plus a text digest. This cleanly separates it from screenshot/detection siblings such as capture_window and vision_detect, which produce images or element lists rather than a textual scene.

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?

Gives a concrete use condition ('when the target has no usable accessibility tree (Electron / canvas apps) or when you cannot look at a picture'), plus per-source guidance on when uia vs ocr vs auto applies. It never names a specific sibling to use instead, so routing is implied rather than explicit.

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