Options & Environment

Inspect readonly

show_option readonly

Show a tmux option value.

Returns: OptionResult

Use when you need to check a tmux configuration value — buffer limits, history size, status bar settings, etc.

Side effects: None. Readonly.

Example:

{
  "tool": "show_option",
  "arguments": {
    "option": "history-limit"
  }
}

Response:

{
  "option": "history-limit",
  "value": "2000"
}

Parameters

Parameter

Type

Required

Default

Description

option

str

yes

The tmux option name to query.

scope

enum

no

Option scope. One of: 'server', 'session', 'window', 'pane'.

target

str

no

Target identifier. For session scope: session name (e.g. ‘mysession’). For window scope: window ID (e.g. ‘@1’). For pane scope: pane ID (e.g. ‘%1’). Requires scope.

global_

bool

no

False

Whether to query the global option.

socket_name

str

no

tmux socket name.


show_environment readonly

Show tmux environment variables.

Returns: EnvironmentResult

Use when you need to inspect tmux environment variables.

Side effects: None. Readonly.

Parameters

Parameter

Type

Required

Default

Description

session_name

str

no

Session name to query environment for.

session_id

str

no

Session ID to query environment for.

socket_name

str

no

tmux socket name.

Act mutating

set_option mutating

Set a tmux option value.

Returns: OptionSetResult

Use when you need to change tmux behavior — adjusting history limits, enabling mouse support, changing status bar format.

Side effects: Changes the tmux option value.

Example:

{
  "tool": "set_option",
  "arguments": {
    "option": "history-limit",
    "value": "50000"
  }
}

Response:

{
  "option": "history-limit",
  "value": "50000",
  "status": "set"
}

Parameters

Parameter

Type

Required

Default

Description

option

str

yes

The tmux option name to set.

value

str

yes

The value to set.

scope

enum

no

Option scope. One of: 'server', 'session', 'window', 'pane'.

target

str

no

Target identifier. For session scope: session name (e.g. ‘mysession’). For window scope: window ID (e.g. ‘@1’). For pane scope: pane ID (e.g. ‘%1’). Requires scope.

global_

bool

no

False

Whether to set the global option.

socket_name

str

no

tmux socket name.


set_environment mutating

Set a tmux environment variable.

Returns: EnvironmentSetResult

Use when you need to set a tmux environment variable.

Side effects: Sets the variable in the tmux server.

Parameters

Parameter

Type

Required

Default

Description

name

str

yes

Environment variable name.

value

str

yes

Environment variable value.

session_name

str

no

Session name to set environment for.

session_id

str

no

Session ID to set environment for.

socket_name

str

no

tmux socket name.