Skip to main content
Glama
laszlopere

mcp-tmux

by laszlopere

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+.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hookYes
commandNo
global_No
unsetNo
targetNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It explains the effect of key parameters (global_ for server-wide, unset for removal) and notes the tmux 2.2+ requirement. It does not describe side effects like overwriting existing hooks or response format, but the core behavior is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the purpose, then parameter explanations, then version requirement. Every sentence adds value, and there is no repetition or fluff. Extremely concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters (1 required) and no output schema, the description covers the main functional aspects. It misses the 'target' parameter and could mention scope, but overall it provides enough to use the tool effectively. A minor gap prevents a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must add meaning. It explains all parameters except 'target' with concrete examples (e.g., 'pane-died', 'gone'). The omission of 'target' is a gap, but the other four parameters are well-described, adding significant value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Set (or unset)' and the resource 'hook that runs a tmux command on an event', distinguishing it from sibling tools like tmux_set_environment or tmux_set_option. It specifies that hooks are event-driven, which is unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use the tool: to define behavior upon events. However, it does not explicitly mention when not to use it or list alternatives, such as using tmux_show_hooks for inspection. The context is sufficient but lacks exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-tmux'

If you have feedback or need assistance with the MCP directory API, please join our Discord server