# kill_session

Source: https://libtmux.org/en/py/latest/mcp/tools/kill_session/

> Kill a tmux session.

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

Kill a tmux session.

Destroys the session and all its windows and panes. Use [kill_window](https://libtmux.org/en/py/latest/mcp/tools/kill_window/) to remove a single window instead. Self-kill protection prevents killing the session containing this MCP process.

[All Python tools](https://libtmux.org/en/py/latest/mcp/tools/) · [JSON](https://libtmux.org/en/py/latest/mcp/tools/kill_session.json) · [Source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/session_tools.py#L374)

## Arguments

* `session_id` optional

  Session ID (e.g. '$1') to look up.

  Default: `null`.

* `session_name` optional

  Session name to look up.

  Default: `null`.

* `socket_name` optional

  tmux socket name. Defaults to LIBTMUX_SOCKET env var.

  Default: `null`.

## Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Session ID (e.g. '$1') to look up."
    },
    "session_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Session name to look up."
    },
    "socket_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "tmux socket name. Defaults to LIBTMUX_SOCKET env var."
    }
  },
  "type": "object"
}
```

Output schema

```json
{
  "properties": {
    "result": {
      "type": "string"
    }
  },
  "required": [
    "result"
  ],
  "type": "object",
  "x-fastmcp-wrap-result": true
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false
}
```
