{
  "name": "set_environment",
  "wireName": "set_environment",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/env_tools.py",
    "line": 130
  },
  "description": "Set a tmux environment variable.\n\nUse to set variables that will be inherited by new panes and windows.\nChanges do not affect already-running processes.\n\nSome variables control later shell execution. Bash sources the file named\nby ``BASH_ENV``, POSIX shells may source the file named by ``ENV``, and\nBash evaluates ``PROMPT_COMMAND`` before displaying a prompt.\n\n.. warning::\n   Values set here propagate into **every** shell tmux later spawns\n   in the targeted scope — including panes the user opens manually,\n   not just panes the agent drives. A caller that writes ``PATH``,\n   ``LD_PRELOAD``, or ``AWS_*`` variables can influence future\n   commands the human user types directly. Treat this as\n   elevated-risk within ``execute``. The audit log\n   redacts the ``value`` argument, but the side effects persist on\n   disk/memory until tmux is restarted. Prefer ``env VAR=value\n   command`` via :func:`~libtmux_mcp.tools.pane_tools.send_keys`\n   when you only need the override for a single command. See\n   :doc:`/topics/trust`.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "name": {
        "description": "Environment variable name.",
        "type": "string"
      },
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session ID to set environment for."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session name to set environment for."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      },
      "value": {
        "description": "Environment variable value.",
        "type": "string"
      }
    },
    "required": [
      "name",
      "value"
    ],
    "type": "object"
  },
  "outputSchema": {
    "description": "Result of a set_environment call.",
    "properties": {
      "name": {
        "description": "Variable name",
        "type": "string"
      },
      "status": {
        "description": "Operation status",
        "type": "string"
      },
      "value": {
        "description": "Value that was set",
        "type": "string"
      }
    },
    "required": [
      "name",
      "value",
      "status"
    ],
    "type": "object"
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "fastmcp": {
      "tags": [
        "execute"
      ]
    }
  }
}
