# create_session

Source: https://libtmux.org/en/cxx/latest/mcp/tools/create_session/

> Create a detached session; names and path data are literalized before tmux expansion. Start a pane's configured process; accepts no command payload.

MCP is in development

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

Create a detached session; names and path data are literalized before tmux expansion. Start a pane’s configured process; accepts no command payload.

[All C++ tools](https://libtmux.org/en/cxx/latest/mcp/tools/) · [JSON](https://libtmux.org/en/cxx/latest/mcp/tools/create_session.json) · [Source](https://github.com/libtmux/libtmux-cxx/blob/96f367a6fe247e4e5ebddd4a52ca5d5f9d07c0ec/apps/mcp/src/tool_catalog.cpp#L2543)

## Arguments

* `height` optional · integer

  Optional detached height.

* `name` optional · string

  Optional literal unique session name.

* `startDirectory` optional · string

  Literal pane start directory.

* `width` optional · integer

  Optional detached width.

* `windowName` optional · string

  Optional literal first window name.

## Schemas

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

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "height": {
      "description": "Optional detached height.",
      "maximum": 100000,
      "minimum": 1,
      "type": "integer"
    },
    "name": {
      "description": "Optional literal unique session name.",
      "maxLength": 512,
      "type": "string"
    },
    "startDirectory": {
      "description": "Literal pane start directory.",
      "maxLength": 4096,
      "type": "string"
    },
    "width": {
      "description": "Optional detached width.",
      "maximum": 100000,
      "minimum": 1,
      "type": "integer"
    },
    "windowName": {
      "description": "Optional literal first window name.",
      "maxLength": 512,
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}
```

Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string"
    },
    "session_id": {
      "pattern": "^\\$[0-9]+$",
      "type": "string"
    }
  },
  "required": [
    "name",
    "session_id"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false,
  "title": "Create a tmux session"
}
```
