pub(crate) const DISCOVER_WINDOWS_TOOL: &str = r#"{
"name": "DiscoverWindows",
"description": "List top-level windows on this machine — read-only: no screenshot taken, nothing written to disk. Use this BEFORE CaptureWindow so you have real candidates (pid, title, exe_path) instead of guessing a title substring. Each entry reports its capture `tier` and whether it is `capturable`. A window owned by a different OS user is never capturable; when it IS listed it appears withheld rather than omitted — `capturable: false`, `title` and `exe_path` null, plus a `withheld_reason` — so you can see that it exists and why it is out of reach without its content crossing that boundary. Whether it is listed at all follows the same `include_foreign` gate as any other window: by default only AgentMux windows are listed, so another user's non-AgentMux window shows up only with `include_foreign: true`. By default lists AgentMux windows only; pass include_foreign to also list other applications (kept opt-in so ordinary discovery does not disclose the titles of a user's unrelated apps). exe_path can reveal the OS username of a different instance's owner on a shared machine, so — same as CaptureWindow — every call is logged to this instance's own audit trail.",
"inputSchema": {
"type": "object",
"properties": {
"include_self": { "type": "boolean", "description": "Include this agent's own AgentMux instance's window(s) in the results. Default false, since they are usually not what you are looking for — but unlike before, they ARE capturable, so pass true when you want your own instance's other windows (e.g. a torn-off floating pane)." },
"include_foreign": { "type": "boolean", "description": "Also list non-AgentMux windows (other applications). Default false so ordinary discovery does not disclose the titles of a user's unrelated apps as a side effect. These are capturable when listed." }
}
}
}"#;