# show_environment

Source: https://libtmux.org/en/py/stable/mcp/tools/show_environment/

> Show tmux environment variables.

tool MCPstable

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

* **show_environment**( [session_id](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsession_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [session_name](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsession_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [socket_name](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsocket_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), )

  tool \[[source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/env_tools.py#L125)][¶](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment)

  Show tmux environment variables.

  Use to inspect tmux environment variables that affect child processes.

  * MCP request method

    `tools/call` Send `show_environment` as the tool name, with the arguments below.

  ## Arguments[#](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.parameters)

  * **[`session_id`](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsession_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session ID to query environment for.

  * **[`session_name`](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsession_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session name to query environment for.

  * **[`socket_name`](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.input%2Fproperties%2Fsocket_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    tmux socket name.

  No other arguments are accepted.

  ## Result[#](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.result)

  Returns [object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")

  * **[`variables`](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.output%2Fproperties%2Fvariables)** ([Record](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")\<string, [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)")>)

    Environment variable mapping

  ## Annotations[#](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.annotations)

  * [`destructiveHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#destructiveHint)

    `true`

  * [`idempotentHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#idempotentHint)

    `false`

  * [`openWorldHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#openWorldHint)

    `true`

  * [`readOnlyHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#readOnlyHint)

    `false`

  ## Protocol data[#](https://libtmux.org/en/py/stable/mcp/tools/show_environment/#mcp.tool.show_environment.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session ID to query environment for."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session name to query environment for."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      }
    },
    "type": "object"
  }
  ```

  Output schema

  ```json
  {
    "description": "Result of a show_environment call.",
    "properties": {
      "variables": {
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "description": "Environment variable mapping",
        "type": "object"
      }
    },
    "required": [
      "variables"
    ],
    "type": "object"
  }
  ```
