Skip to main content
Glama
nickgnd

Tmux MCP Server

by nickgnd

kill-pane

Terminate a specific tmux pane by its ID to remove unused terminal windows and manage session resources.

Instructions

Kill a tmux pane by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paneIdYesID of the tmux pane to kill

Implementation Reference

  • The handler function for the "kill-pane" MCP tool. It takes a paneId parameter, calls the tmux.killPane helper, and returns a success or error message.
    async ({ paneId }) => {
      try {
        await tmux.killPane(paneId);
        return {
          content: [{
            type: "text",
            text: `Pane ${paneId} has been killed`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Error killing pane: ${error}`
          }],
          isError: true
        };
      }
    }
  • Input schema for the "kill-pane" tool using Zod to validate the paneId parameter.
    {
      paneId: z.string().describe("ID of the tmux pane to kill")
    },
  • src/index.ts:287-312 (registration)
    Registration of the "kill-pane" tool with the MCP server, including name, description, input schema, and handler function.
    server.tool(
      "kill-pane",
      "Kill a tmux pane by ID",
      {
        paneId: z.string().describe("ID of the tmux pane to kill")
      },
      async ({ paneId }) => {
        try {
          await tmux.killPane(paneId);
          return {
            content: [{
              type: "text",
              text: `Pane ${paneId} has been killed`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `Error killing pane: ${error}`
            }],
            isError: true
          };
        }
      }
    );
  • Helper function tmux.killPane that executes the actual tmux 'kill-pane' command using executeTmux.
    export async function killPane(paneId: string): Promise<void> {
      await executeTmux(`kill-pane -t '${paneId}'`);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the destructive action ('kill') but doesn't elaborate on what 'kill' entails (e.g., whether it terminates processes, removes pane from layout, is irreversible), nor does it mention permissions needed, side effects, or error conditions. For a destructive operation with zero annotation coverage, this is insufficient.

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

Conciseness5/5

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

The description is a single, direct sentence that communicates the core functionality without any wasted words. It's appropriately sized for a simple tool with one parameter and is front-loaded with the essential information. Every word earns its place.

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?

For a destructive tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'kill' means behaviorally, what happens after execution, potential errors, or how to obtain pane IDs (though list-panes is a sibling). The combination of destructive action and lack of structured metadata requires more descriptive context than provided.

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%, with the single parameter 'paneId' fully documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema (which specifies 'ID of the tmux pane to kill'). This meets the baseline expectation when schema coverage is complete.

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 ('kill') and target resource ('a tmux pane by ID'), making the purpose immediately understandable. It distinguishes from siblings like kill-session and kill-window by specifying pane-level operation, though it doesn't explicitly contrast with them. The description avoids tautology by providing meaningful context beyond the tool name.

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 like kill-session or kill-window, nor does it mention prerequisites or consequences. It simply states what the tool does without contextual usage instructions, leaving the agent to infer appropriate scenarios based on the action name alone.

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

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