tmux_set_hook
Set or unset a hook that runs a tmux command on events like pane-died or session-created. Optionally apply globally or remove hooks.
Instructions
Set (or unset) a hook that runs a tmux command on an event.
hook is the event name, e.g. "pane-died" or "session-created";
command is the tmux command to run (a command string like
'display "gone"'). global_=True (-g) sets it server-wide; unset=True
(-u) removes the hook instead. Requires tmux 2.2+.
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": {
"hook": "<hook>"
},
"name": "tmux_set_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hook | Yes | ||
| command | No | ||
| global_ | No | ||
| unset | No | ||
| target | No |