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

get_tmux_variables

get_tmux_variables( names: Array<string>, pane?: string | null, )

Read a bounded set of tmux variables against one pane. tmux reads a name it does not know as a format from its environment, so a name the server or session environment holds is refused unless the operator listed it in LIBTMUX_ENVIRONMENT_VALUES at startup. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

MCP request method
tools/call Send get_tmux_variables as the tool name, with the arguments below.
Wraps
server.Server.formatThe library call this tool makes: crates/tmux-mcp/src/tools/contract.rs:698.

Arguments

No other arguments are accepted.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
false
idempotentHint
true
openWorldHint
false
readOnlyHint
true
title
"Get tmux Variables"

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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"names": {
"description": "tmux format variable names, such as `pane_current_path`.",
"items": {
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
"type": "string"
},
"maxItems": 32,
"minItems": 1,
"type": "array"
},
"pane": {
"description": "The `%`-prefixed pane to read them against. Omit to let tmux pick\nits current pane.",
"type": [
"string",
"null"
]
}
},
"required": [
"names"
],
"type": "object"
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"values": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"required": [
"values"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference