# kill_session

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

> Delete tmux state; accepts no command payload. Remove a session. Windows and panes shared with another session remain available there.

tool MCPlatest

MCP concept example

A working example of the core library. It can change without notice.

[What concept means](https://libtmux.org/en/meta/support/#concept-and-alpha)

* **kill_session**( [force](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.input%2Fproperties%2Fforce)?: [boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"), [session](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.input%2Fproperties%2Fsession): [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), )

  tool \[[source](https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/mcp/src/tools/lifecycle.ts#L386)][¶](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session)

  Delete tmux state; accepts no command payload. Remove a session. Windows and panes shared with another session remain available there.

  * MCP request method

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

  ## Arguments[#](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.parameters)

  * **[`force`](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.input%2Fproperties%2Fforce)**? ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"))

    Allow this to target the pane this server itself was called from, which is otherwise refused. It does not override the refusal to touch a pane a person is watching.

  * **[`session`](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.input%2Fproperties%2Fsession)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Session id ($1) or name.

  ## Result[#](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.result)

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

  * **[`killed`](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.output%2Fproperties%2Fkilled)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Stable session id, e.g. $1.

    * pattern

      `"^\\$\\d+$"`

  No other properties are accepted.

  ## Annotations[#](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.annotations)

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

    `true`

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

    `false`

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

    `true`

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

    `false`

  ## Protocol data[#](https://libtmux.org/en/ts/latest/mcp/tools/kill_session/#mcp.tool.kill_session.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "force": {
        "description": "Allow this to target the pane this server itself was called from, which is otherwise refused. It does not override the refusal to touch a pane a person is watching.",
        "type": "boolean"
      },
      "session": {
        "description": "Session id ($1) or name.",
        "type": "string"
      }
    },
    "required": [
      "session"
    ],
    "type": "object"
  }
  ```

  Output schema

  ```json
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "killed": {
        "description": "Stable session id, e.g. $1.",
        "pattern": "^\\$\\d+$",
        "type": "string"
      }
    },
    "required": [
      "killed"
    ],
    "type": "object"
  }
  ```
