Set option

set_option

set_option
mutating tool

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.