Skip to main content
Glama

tmux_kill_session

Terminate a tmux session and all its windows and panes by specifying the session name. Use this tool to clean up unused terminal sessions in the Tmux MCP Server environment.

Instructions

Kill/terminate a tmux session and all its windows and panes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_nameYesName of the tmux session to kill

Implementation Reference

  • Executes the tmux_kill_session tool by running the tmux kill-session command asynchronously and returns a success message or throws an error.
    async killSession(args) { const { session_name } = args; try { await execAsync(`tmux kill-session -t "${session_name}"`); return { content: [ { type: "text", text: `Killed tmux session: ${session_name}`, }, ], }; } catch (error) { throw new Error(`Failed to kill session: ${error.message}`); } }
  • Input schema for the tmux_kill_session tool, requiring a session_name string parameter.
    inputSchema: { type: "object", properties: { session_name: { type: "string", description: "Name of the tmux session to kill", }, }, required: ["session_name"], },
  • src/index.js:114-128 (registration)
    Registers the tmux_kill_session tool in the ListTools response, including name, description, and input schema.
    { name: "tmux_kill_session", description: "Kill/terminate a tmux session and all its windows and panes.", inputSchema: { type: "object", properties: { session_name: { type: "string", description: "Name of the tmux session to kill", }, }, required: ["session_name"], }, },
  • src/index.js:199-200 (registration)
    Dispatches to the killSession handler in the CallToolRequest switch statement.
    case "tmux_kill_session": return await this.killSession(args);

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