Skip to main content
Glama
laszlopere

mcp-tmux

by laszlopere

tmux_set_environment

Set, remove, or unset environment variables in tmux sessions or globally. Manage variable inheritance for new panes and spawned commands.

Instructions

Set or unset an environment variable for a session (or globally).

Set global_=True (-g) to affect the global environment that new sessions inherit, instead of one session. With a value, sets the variable; commands spawned afterwards in that session's panes inherit it (the race-free alternative to an export typed via send_keys).

To clear a variable, pass remove=True (-r, mark it for removal so the child sees it unset even if it exists globally) or unset=True (-u, delete it from this session's environment). session is the -t target.

Returns {"set"/"removed"/"unset": name, ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
valueNo
global_No
removeNo
unsetNo
sessionNo
targetNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full behavioral transparency burden. It discloses that setting affects commands spawned afterwards, explains the difference between remove (mark for removal) and unset (delete), and notes it is race-free. Minor omission: does not describe effects on existing child processes or required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively concise and front-loaded with purpose. It uses parentheses, dashes, and clear terminology. The explanation of race-free alternative adds value but could be trimmed slightly. Overall, efficient for the content conveyed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters, 1 required, no output schema, and no annotations, the description covers major behaviors (set, unset, global, session) but lacks clarity on the 'target' parameter and default behavior when neither remove nor unset is specified. The return format is partially described but could be more explicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains global_, value, remove, unset, and session well. However, it confuses session with target (stating 'session is the -t target') without clarifying the separate target parameter. This ambiguity reduces semantic clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Set or unset an environment variable for a session (or globally).' This provides a specific verb (set/unset), resource (environment variable), and scope (session/global), distinguishing it from sibling tools like tmux_set_option or tmux_set_hook.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool: to set environment variables as a race-free alternative to export, and to clear variables using remove or unset. However, it does not explicitly state when not to use it or list alternatives among siblings, which would improve guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-tmux'

If you have feedback or need assistance with the MCP directory API, please join our Discord server