Skip to main content
Glama

list_tmux_sessions

Retrieve available tmux sessions to integrate with macOS notifications, enabling focused session management directly from the notification interface.

Instructions

List available tmux sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_tmux_sessions' that lists available tmux sessions via notifier.listSessions() and returns a formatted text response.
    case 'list_tmux_sessions': { const sessions = await notifier.listSessions() return { content: [ { type: 'text', text: sessions.length > 0 ? `Available tmux sessions:\n${sessions.map((s) => `- ${s}`).join('\n')}` : 'No tmux sessions found', }, ], } }
  • src/index.ts:83-90 (registration)
    Registration of the 'list_tmux_sessions' tool in the ListToolsRequestHandler response, defining its name, description, and input schema.
    { name: 'list_tmux_sessions', description: 'List available tmux sessions', inputSchema: { type: 'object', properties: {}, }, },
  • Supporting utility method in TmuxNotifier class that executes the 'tmux list-sessions -F #{session_name}' command to retrieve the list of tmux session names.
    async listSessions(): Promise<string[]> { try { const output = await this.runCommand('tmux', [ 'list-sessions', '-F', '#{session_name}', ]) return output.trim().split('\n').filter(Boolean) } catch (_error) { return [] } }

Other Tools

Related 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/yuki-yano/macos-notify-mcp'

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