center_window
Center a macOS window on its current or chosen display. Optionally specify the app, window, or resize before centering.
Instructions
Center a macOS window on its current display or a selected display.
Args: 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 width: Optional width to apply before centering height: Optional height to apply before centering
Returns: JSON string with final window metadata, or an error message.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "center_window"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| app_name | No | ||
| window_id | No | ||
| window_index | No | ||
| display_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |