MCPAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

rename_session

Rename a tmux session.

Use when a session’s purpose has changed. Existing pane_id references remain valid after renaming.

All Python tools · JSON · Source

Arguments

new_name required · string
New name for the session.
session_id optional
Session ID (e.g. '$1') to look up.

Default: null.

session_name optional
Current 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
{
"additionalProperties": false,
"properties": {
"new_name": {
"description": "New name for the session.",
"type": "string"
},
"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": "Current session name to look up."
},
"socket_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "tmux socket name. Defaults to LIBTMUX_SOCKET env var."
}
},
"required": [
"new_name"
],
"type": "object"
}
Output schema
{
"description": "Serialized tmux session.",
"properties": {
"active_pane_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane id (``%N``) of the session's active pane. Guaranteed non-None on ``create_session`` return (libtmux creates the session with one initial pane). May be None from ``list_sessions`` rows for sessions in transient teardown states where ``active_pane`` is unavailable."
},
"session_attached": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Attached client count"
},
"session_created": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp"
},
"session_id": {
"description": "Session ID (e.g. '$1')",
"type": "string"
},
"session_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session name"
},
"window_count": {
"description": "Number of windows",
"type": "integer"
}
},
"required": [
"session_id",
"window_count"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false
}
Esc

Type to search.