MCPconceptTools

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

Concept example A working example of the core library. It can change without notice. What concept means

tool MCP

show_option

Read a tmux option, such as history-limit or a user option like @theme. Name the scope the option lives in; global-session is what tmux uses when a command names no target. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

MCP request method
tools/call Send show_option as the tool name, with the arguments below.

Arguments

  • name (string)

    The option name, such as history-limit or a user option like @theme.

  • scope? (OptionScopeSchema | null)

    Which tmux object the option belongs to.

    One of server, global-session, global-window, session, window, or pane. Defaults to global-session, which is what setting an option without a target means in tmux.

  • target? (string | null)

    The $, @ or %-prefixed id, for the scopes that need one. Omit for the others.

No other arguments are accepted.

Result

Returns object

Types

OptionScopeSchema: "server" | "global-session" | "global-window" | "session" | "window" | "pane"

type

Annotations

Advertised by the server

destructiveHint
false
idempotentHint
true
openWorldHint
false
readOnlyHint
true
title
"Read tmux Option"

Capability

Toolset
Inspect Request tmux state and terminal output.
Process reach
none
tmux effects
observe

The capability row states what this tool reads, changes and reaches; the annotations are as the server advertises them.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"$defs": {
"OptionScopeSchema": {
"enum": [
"server",
"global-session",
"global-window",
"session",
"window",
"pane"
],
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"name": {
"description": "The option name, such as `history-limit` or a user option like `@theme`.",
"type": "string"
},
"scope": {
"anyOf": [
{
"$ref": "#/$defs/OptionScopeSchema"
},
{
"type": "null"
}
],
"description": "Which tmux object the option belongs to.\n\nOne of `server`, `global-session`, `global-window`, `session`,\n`window`, or `pane`. Defaults to `global-session`, which is what\nsetting an option without a target means in tmux."
},
"target": {
"description": "The `$`, `@` or `%`-prefixed id, for the scopes that need one. Omit\nfor the others.",
"type": [
"string",
"null"
]
}
},
"required": [
"name"
],
"type": "object"
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"name": {
"description": "The option name.",
"type": "string"
},
"value": {
"description": "Its value, absent when it has never been set at that scope.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"value"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference