Skip to content

Add list_targets: enumerate monitors and windows (title, exe, hwnd, DPI, WGC-capable) for agents to pick from #213

Closed

Description

@TMHSDigital

Why it matters

window:hwnd= and window:exe= targets exist (README:239), and the window-not-found error suggests "use window:hwnd=". But no tool or resource returns hwnds, exe names, or monitor indices. Agents guess window titles, which is exactly the failure class behind #89. A list call before start_recording or screenshot turns guessing into choosing.

Evidence

  • src/resources.ts exposes sessions only.
  • src/utils/windows.ts and src/utils/monitors.ts already enumerate windows and monitors internally (the error at windows.ts:128). They are just not exposed.

Suggested approach

Add a read-only list_targets tool (and optionally a screencast://targets resource) that returns:

  • monitors: index, bounds, DPI scale, primary.
  • windows: title, exe, hwnd, pid, bounds, minimized, cloaked, and whether WGC can capture it.

Each entry should include a ready-to-use target string. Support filters (exe, titleContains). Reuse the timeout handling from #183.

Done when

  • The tool is registered, in mcp-tools.json, and documented.
  • Every returned target string round-trips through screenshot.

Activity

  1. added
    feature
    effort: small
    impact: high
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: smallfeatureimpact: highpriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions