Skip to main content
Glama

list-terminals

Retrieve details of all active terminal sessions managed by the iTerm MCP Server to monitor or interact with open terminals in iTerm2.

Instructions

List all active terminals and their information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:243-262 (registration)
    Registration of the 'list-terminals' tool, including empty input schema and inline handler function that lists active terminal IDs and count using the global 'terminals' Map.
    server.tool( "list-terminals", "List all active terminals and their information", {}, async () => { const activeTerminals = Array.from(terminals.entries()).map(([id]) => id); const count = terminals.size; return { content: [ { type: "text", text: `Number of active terminals: ${count}\nActive terminal IDs: ${ activeTerminals.join(", ") || "None" }`, }, ], }; } );
  • The handler function for 'list-terminals' tool. It extracts terminal IDs from the global 'terminals' Map, counts them, and returns a formatted text response listing the count and IDs.
    async () => { const activeTerminals = Array.from(terminals.entries()).map(([id]) => id); const count = terminals.size; return { content: [ { type: "text", text: `Number of active terminals: ${count}\nActive terminal IDs: ${ activeTerminals.join(", ") || "None" }`, }, ], }; }
  • Empty input schema (no parameters) for the 'list-terminals' tool.
    {},

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/rishabkoul/iTerm-MCP-Server'

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