MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

tool MCP

show_hooks

show_hooks( session?: string | null, )

List the hooks tmux runs when something happens on the server, such as a pane exiting. This tool does not set hooks. Hooks set through another path remain in their server or session until unset; configuration files persist them across server restarts. Reach for this when tmux does something no tool here asked for. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

MCP request method
tools/call Send show_hooks as the tool name, with the arguments below.

Arguments

  • session? (string | null)

    The session whose hooks to read, by $-prefixed id or name. Omit for the server’s own.

No other arguments are accepted.

Result

Returns object

Types

Hook: object

type

One tmux hook.

Annotations

Advertised by the server

destructiveHint
false
idempotentHint
true
openWorldHint
false
readOnlyHint
true
title
"Show tmux Hooks"

Capability

Toolset
Inspect Request tmux state and terminal output.
Process reach
none
tmux effects
observe

The capability row states what this tool reads, changes and reaches; the annotations are as the server advertises them.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"session": {
"description": "The session whose hooks to read, by `$`-prefixed id or name. Omit for\nthe server's own.",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
Output schema
{
"$defs": {
"Hook": {
"description": "One tmux hook.",
"properties": {
"command": {
"description": "The command tmux runs.",
"type": "string"
},
"index": {
"description": "Its index, when the hook is an array.",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"name": {
"description": "The hook name, such as `pane-exited`.",
"type": "string"
}
},
"required": [
"name",
"index",
"command"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"hooks": {
"description": "The hooks, in tmux's own order.",
"items": {
"$ref": "#/$defs/Hook"
},
"type": "array"
}
},
"required": [
"hooks"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference