{
  "name": "show_hook",
  "wireName": "show_hook",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/hook_tools.py",
    "line": 248
  },
  "description": "Look up a specific tmux hook by name.\n\nReturns a :class:`~libtmux_mcp.models.HookListResult` with zero or\nmore :class:`~libtmux_mcp.models.HookEntry` rows — zero if the hook\nis unset, one if it is a scalar hook, and multiple if it is an\narray hook with sparse indices.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "global_": {
        "default": false,
        "description": ":func:`~libtmux_mcp.tools.hook_tools.show_hooks`.",
        "type": "boolean"
      },
      "hook_name": {
        "description": "Hook to look up (e.g. ``\"pane-exited\"``).",
        "type": "string"
      },
      "scope": {
        "anyOf": [
          {
            "enum": [
              "server",
              "session",
              "window",
              "pane"
            ],
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": ":func:`~libtmux_mcp.tools.hook_tools.show_hooks`."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": ":func:`~libtmux_mcp.tools.hook_tools.show_hooks`."
      },
      "target": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": ":func:`~libtmux_mcp.tools.hook_tools.show_hooks`."
      }
    },
    "required": [
      "hook_name"
    ],
    "type": "object"
  },
  "outputSchema": {
    "description": "Structured result for hook introspection.\n\nReturned by :func:`~libtmux_mcp.tools.hook_tools.show_hooks` and\n:func:`~libtmux_mcp.tools.hook_tools.show_hook`.\nFlat list of :class:`~libtmux_mcp.models.HookEntry` instances so\nMCP clients can iterate without caring whether the underlying tmux\nhook is scalar or array-shaped.",
    "properties": {
      "entries": {
        "items": {
          "description": "One entry in a tmux hook array.\n\nHooks like ``session-renamed`` are arrays — they can have multiple\ncommands registered at sparse indices.\n:class:`~libtmux_mcp.models.HookEntry` flattens one index+command\npair into a serialisable row.",
          "properties": {
            "command": {
              "description": "tmux command string registered at that index.",
              "type": "string"
            },
            "hook_name": {
              "description": "Hook name (e.g. 'pane-exited').",
              "type": "string"
            },
            "index": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Array index for array-style hooks (e.g. session-renamed[3]). ``None`` for scalar hooks."
            }
          },
          "required": [
            "hook_name",
            "command"
          ],
          "type": "object"
        },
        "type": "array"
      }
    },
    "type": "object"
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "fastmcp": {
      "tags": [
        "inspect"
      ]
    }
  }
}
