# kill_pane

Source: https://libtmux.org/en/py/stable/mcp/tools/kill_pane/

> Kill (close) a tmux pane. Requires exact pane_id (e.g. '%5').

tool MCPstable

MCP is in development

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

* **kill_pane**( [pane_id](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.input%2Fproperties%2Fpane_id): [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), [socket_name](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.input%2Fproperties%2Fsocket_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), )

  tool \[[source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/__init__.py#L116)][¶](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane)

  Kill (close) a tmux pane. Requires exact pane_id (e.g. ‘%5’).

  Use to clean up panes no longer needed. To remove an entire window and all its panes, use [kill_window](https://libtmux.org/en/py/stable/mcp/tools/kill_window/) instead.

  * MCP request method

    `tools/call` Send `kill_pane` as the tool name, with the arguments below.

  ## Arguments[#](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.parameters)

  * **[`pane_id`](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.input%2Fproperties%2Fpane_id)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Pane ID (e.g. ‘%1’). Required — no fallback resolution.

  * **[`socket_name`](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.input%2Fproperties%2Fsocket_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    tmux socket name.

  No other arguments are accepted.

  ## Result[#](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.result)

  Returns [object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")

  * **[`result`](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.output%2Fproperties%2Fresult)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

  ## Annotations[#](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.annotations)

  * [`destructiveHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#destructiveHint)

    `true`

  * [`idempotentHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#idempotentHint)

    `false`

  * [`openWorldHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#openWorldHint)

    `true`

  * [`readOnlyHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#readOnlyHint)

    `false`

  ## Protocol data[#](https://libtmux.org/en/py/stable/mcp/tools/kill_pane/#mcp.tool.kill_pane.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "pane_id": {
        "description": "Pane ID (e.g. '%1'). Required — no fallback resolution.",
        "type": "string"
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      }
    },
    "required": [
      "pane_id"
    ],
    "type": "object"
  }
  ```

  Output schema

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