show_environment
-
List the variables tmux hands to processes it starts, for the server or for one session, and whether each is set or marked for removal. Values are withheld: a tmux server inherits the environment of the shell that started it, tokens and keys included. A value is returned only for a name the operator listed in LIBTMUX_ENVIRONMENT_VALUES at startup, and is then returned in clear. This is not the environment of anything already running: a pane started before a change keeps what it was given. Read the tmux environment; accepts no client-supplied executable input. Values are withheld unless the operator allowed the name.
- MCP request method
tools/callSendshow_environmentas the tool name, with the arguments below.
Arguments
-
The session whose environment to read, by
$-prefixed id or name.Omit for the server’s own.
No other arguments are accepted.
Result
Returns object
Types
-
EnvironmentEntry: object One tmux environment entry.
-
The variable name.
-
Whether the name holds a value or is marked for removal.
-
The value, only for a set variable whose name the operator allowed in
LIBTMUX_ENVIRONMENT_VALUESat startup. -
True for a set variable whose value was not returned because the operator did not allow its name.
-
Annotations
Advertised by the server
destructiveHintfalseidempotentHinttrueopenWorldHintfalsereadOnlyHinttruetitle"Show tmux Environment"
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": {"session": {"description": "The session whose environment to read, by `$`-prefixed id or name.\n\nOmit for the server's own.","type": ["string","null"]}},"type": "object"}Output schema
{"$defs": {"EnvironmentEntry": {"description": "One tmux environment entry.","properties": {"name": {"description": "The variable name.","type": "string"},"state": {"$ref": "#/$defs/EnvironmentState","description": "Whether the name holds a value or is marked for removal."},"value": {"description": "The value, only for a set variable whose name the operator allowed in\n`LIBTMUX_ENVIRONMENT_VALUES` at startup.","type": ["string","null"]},"withheld": {"description": "True for a set variable whose value was not returned because the\noperator did not allow its name.","type": "boolean"}},"required": ["name","state","value","withheld"],"type": "object"},"EnvironmentState": {"description": "What tmux holds under one environment name.","oneOf": [{"const": "set","description": "tmux holds a value and hands it to processes it starts.","type": "string"},{"const": "removed","description": "tmux removes the name from the environment of processes it starts.","type": "string"}]}},"$schema": "https://json-schema.org/draft/2020-12/schema","properties": {"entries": {"description": "The entries, in tmux's own order.","items": {"$ref": "#/$defs/EnvironmentEntry"},"type": "array"},"session": {"description": "The session the environment belongs to, or absent for the server's.","type": ["string","null"]}},"required": ["entries","session"],"type": "object"}