# get_tmux_variables

Source: https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/

> Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration. Resolve validated tmux variable names without accepting raw format syntax.

tool MCPlatest

MCP concept example

A working example of the core library. It can change without notice.

[What concept means](https://libtmux.org/en/meta/support/#concept-and-alpha)

* **get_tmux_variables**( [names](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.input%2Fproperties%2Fnames): [Array](https://json-schema.org/understanding-json-schema/reference/array "array (JSON Schema)")<[string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)")>, [paneId](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.input%2Fproperties%2FpaneId)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), )

  tool \[[source](https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/mcp/src/tools/target.ts#L263)][¶](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables)

  Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration. Resolve validated tmux variable names without accepting raw format syntax.

  * MCP request method

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

  ## Arguments[#](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.parameters)

  * **[`names`](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.input%2Fproperties%2Fnames)** ([Array](https://json-schema.org/understanding-json-schema/reference/array "array (JSON Schema)")<[string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)")>)

    Variable names to resolve, such as “pane_current_command” — bare names, not `#{…}` format syntax.

    * minItems

      `1`

    * maxItems

      `32`

    - **[Items](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.input%2Fproperties%2Fnames%2Fitems)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

      * pattern

        `"^[A-Za-z][A-Za-z0-9_]*$"`

  * **[`paneId`](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.input%2Fproperties%2FpaneId)**? ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Stable pane id, e.g. %1.

    * pattern

      `"^%\\d+$"`

  ## Result[#](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.result)

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

  * **[`values`](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.output%2Fproperties%2Fvalues)** ([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)")>)

  No other properties are accepted.

  ## Annotations[#](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.annotations)

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

    `true`

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

    `false`

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

    `true`

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

    `false`

  ## Protocol data[#](https://libtmux.org/en/ts/latest/mcp/tools/get_tmux_variables/#mcp.tool.get_tmux_variables.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "names": {
        "description": "Variable names to resolve, such as \"pane_current_command\" — bare names, not `#{…}` format syntax.",
        "items": {
          "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
          "type": "string"
        },
        "maxItems": 32,
        "minItems": 1,
        "type": "array",
        "x-libtmux-tmux-format": "validated-variable-name"
      },
      "paneId": {
        "description": "Stable pane id, e.g. %1.",
        "pattern": "^%\\d+$",
        "type": "string"
      }
    },
    "required": [
      "names"
    ],
    "type": "object"
  }
  ```

  Output schema

  ```json
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "values": {
        "additionalProperties": {
          "type": "string"
        },
        "propertyNames": {
          "type": "string"
        },
        "type": "object"
      }
    },
    "required": [
      "values"
    ],
    "type": "object"
  }
  ```
