resize_window
Resize any macOS window to exact dimensions and automatically clamp it to the target display for proper placement.
Instructions
Resize a macOS window and clamp it to the selected or current display.
Args: width: Target width in points height: Target height in points app_name: Optional app name, bundle id, or process name window_id: Optional CoreGraphics window id window_index: Optional 1-based index among the app's windows display_index: Optional 1-based display index for clamping placement
Returns: JSON string with final window metadata, or an error message.
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": {
"width": "<width>",
"height": "<height>"
},
"name": "resize_window"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| app_name | No | ||
| window_id | No | ||
| window_index | No | ||
| display_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |