apple_preview
Manage Preview app documents: open files, list open documents, and close current or all documents for macOS automation.
Instructions
Control Preview app. Actions: open, list_open, close, close_all. Note: Preview has limited AppleScript support.
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": {
"action": "<action>"
},
"name": "apple_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | POSIX path to the file to open | |
| action | Yes | open: Open a file in Preview; list_open: List currently open documents in Preview; close: Close the front document in Preview; close_all: Close all documents in Preview | |
| confirm | No | Set to true to confirm a protected/destructive action. Without this, protected actions return a preview instead of executing. |