trigger_macro
Run a Keyboard Maestro macro by name or UUID on a configured remote Mac; pass an optional value and retrieve clipboard results afterward when a macro produces output.
Instructions
Trigger a Keyboard Maestro macro by name or UUID. The macro runs on the remote machine.
IMPORTANT: Keyboard Maestro's web server does not return macro output directly. If you need to retrieve results from a macro:
For macros that capture screenshots or copy data to clipboard: call get_clipboard_result afterward to retrieve the clipboard contents
For macros that write to files: the files are saved on the remote machine
Common patterns:
Screenshot workflow: trigger_macro("Take Screenshot...") → get_clipboard_result() to see the image
Text capture: trigger_macro("Copy Selection") → get_clipboard_result() to get the text
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": {
"macro": "<macro>"
},
"name": "trigger_macro"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macro | Yes | The macro name or UUID to trigger | |
| value | No | Optional value to pass to the macro (available as %TriggerValue% in the macro) | |
| machine | No | Name of the machine to trigger the macro on (defaults to first configured machine) |