Skip to main content
Glama

tmux_select_pane

Select a specific pane in a tmux session to activate it for command execution, enabling focused terminal automation and debugging workflows.

Instructions

Select a specific pane in a tmux session to make it active for commands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_nameYesName of the tmux session
pane_indexYesPane index to select (e.g., '0', '1', '2')

Implementation Reference

  • The main handler function for tmux_select_pane tool. It executes the tmux select-pane command using the provided session_name and pane_index arguments.
    async selectPane(args) {
      const { session_name, pane_index } = args;
    
      try {
        await execAsync(
          `tmux select-pane -t "${session_name}:${pane_index}"`
        );
    
        return {
          content: [
            {
              type: "text",
              text: `Selected pane ${pane_index} in session ${session_name}`,
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to select pane: ${error.message}`);
      }
    }
  • Input schema definition for the tmux_select_pane tool, specifying session_name and pane_index as required string parameters.
    inputSchema: {
      type: "object",
      properties: {
        session_name: {
          type: "string",
          description: "Name of the tmux session",
        },
        pane_index: {
          type: "string",
          description: "Pane index to select (e.g., '0', '1', '2')",
        },
      },
      required: ["session_name", "pane_index"],
    },
  • src/index.js:149-167 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: "tmux_select_pane",
      description:
        "Select a specific pane in a tmux session to make it active for commands.",
      inputSchema: {
        type: "object",
        properties: {
          session_name: {
            type: "string",
            description: "Name of the tmux session",
          },
          pane_index: {
            type: "string",
            description: "Pane index to select (e.g., '0', '1', '2')",
          },
        },
        required: ["session_name", "pane_index"],
      },
    },
  • src/index.js:203-204 (registration)
    Switch case in CallToolRequestHandler that maps tmux_select_pane to the selectPane method.
    case "tmux_select_pane":
      return await this.selectPane(args);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool makes a pane 'active for commands', which implies a state change but doesn't disclose behavioral traits like whether this affects other panes, if it's reversible, error conditions (e.g., invalid index), or side effects. For a mutation tool with zero annotation coverage, this is inadequate.

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 a single, clear sentence that's front-loaded with the core action. It's appropriately sized for a simple tool, with no wasted words. However, it could be slightly more structured (e.g., adding a brief example or context) without losing conciseness.

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

Completeness2/5

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

Given the tool has no annotations, no output schema, and is a mutation tool (changing pane state), the description is incomplete. It doesn't cover what happens on success/failure, return values, or error handling. For a tool that modifies tmux session state, more context is needed to use it effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters (session_name, pane_index) with descriptions. The description adds no additional meaning beyond what's in the schema—it doesn't explain parameter relationships, format details, or examples. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('select') and resource ('a specific pane in a tmux session'), with the purpose to 'make it active for commands'. It distinguishes from siblings like tmux_list_panes (list) or tmux_send_keys (send input), but doesn't explicitly differentiate from all alternatives. The purpose is specific but could be more precise about what 'active' means in tmux context.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing session/pane), when-not-to-use scenarios, or how it relates to siblings like tmux_list_panes (which might be needed first to get pane indices). Usage is implied but not explicitly stated.

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/MediocreTriumph/tmux-mcp'

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