MCPpre-alphaTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

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

tool MCP

set_option

set_option( global_?: boolean, option: string, scope?: "server" | "session" | "window" | "pane" | null, socket_name?: string | null, target?: string | null, value: string, )

Set a tmux option value.

Some option values are executable. tmux runs a #(...) job inside the status formats when it draws them, and repeats it on the status interval; default-command and default-shell decide what every future pane runs, and command-alias rewrites later commands. The value is stored verbatim, so an option that interprets it later runs what is stored, not what this call did.

Use to change tmux behavior at runtime. Common uses: adjusting history-limit, enabling mouse support, changing status bar format.

MCP request method
tools/call Send set_option as the tool name, with the arguments below.
Wraps
libtmux.options.OptionsMixin.set_optionThe library call this tool makes: src/libtmux_mcp/tools/option_tools.py:147.

Arguments

  • global_? = false (boolean)

    Whether to set the global option.

  • option (string)

    The tmux option name to set.

  • scope? = null ("server" | "session" | "window" | "pane" | null)

    Option scope.

  • socket_name? = null (string | null)

    tmux socket name.

  • target? = null (string | null)

    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.

  • value (string)

    The value to set.

No other arguments are accepted.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

Capability

Toolset
Execute Start or drive pane processes, or store state that can control later execution.

Every Python tool advertises the same annotations, so a host that approves by annotation cannot tell tools apart. The capability row is what tells them apart.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"global_": {
"default": false,
"description": "Whether to set the global option.",
"type": "boolean"
},
"option": {
"description": "The tmux option name to set.",
"type": "string"
},
"scope": {
"anyOf": [
{
"enum": [
"server",
"session",
"window",
"pane"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Option scope."
},
"socket_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "tmux socket name."
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Target identifier. For session scope: session name\n(e.g. 'mysession'). For window scope: window ID (e.g. '@1').\nFor pane scope: pane ID (e.g. '%1'). Requires scope."
},
"value": {
"description": "The value to set.",
"type": "string"
}
},
"required": [
"option",
"value"
],
"type": "object"
}
Output schema
{
"description": "Result of a set_option call.",
"properties": {
"option": {
"description": "Option name",
"type": "string"
},
"status": {
"description": "Operation status",
"type": "string"
},
"value": {
"description": "Value that was set",
"type": "string"
}
},
"required": [
"option",
"value",
"status"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference