close_window
Closes a Windows window safely by sending WM_CLOSE only after verifying it still matches the expected title and process, preventing accidental closure of a changed window.
Instructions
Close a window safely (WM_CLOSE after verification — never blind Alt+F4). Pass expect_title/expect_process to refuse (409) if the window changed.
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": "close_window"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hwnd | Yes | ||
| expect_title | No | ||
| expect_process | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |