Skip to main content
Glama
bvisible

MCP SSH Manager

ssh_tunnel_list

List active SSH tunnels to monitor connections and manage secure remote access across servers.

Instructions

List active SSH tunnels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNoFilter by server name

Implementation Reference

  • Handler function that lists all active SSH tunnels (filtered by serverName if provided). Returns array of tunnel info objects with id, server, type, state, config, stats, timestamps, and active connections.
    export function listTunnels(serverName = null) {
      const activeTunnels = [];
    
      for (const [id, tunnel] of tunnels.entries()) {
        if (tunnel.state !== TUNNEL_STATES.CLOSED) {
          if (!serverName || tunnel.serverName === serverName) {
            activeTunnels.push(tunnel.getInfo());
          }
        }
      }
    
      return activeTunnels;
    }
  • Registration of 'ssh_tunnel_list' tool in the TOOL_GROUPS.advanced array. Used by the system to conditionally register MCP tools based on user configuration.
    advanced: [
      'ssh_deploy',
      'ssh_execute_sudo',
      'ssh_alias',
      'ssh_command_alias',
      'ssh_hooks',
      'ssh_profile',
      'ssh_connection_status',
      'ssh_tunnel_create',
      'ssh_tunnel_list',
      'ssh_tunnel_close',
      'ssh_key_manage',
      'ssh_execute_group',
      'ssh_group_manage',
      'ssh_history'
    ]
  • SSHTunnel.getInfo() method called by listTunnels to serialize tunnel information for the tool response.
    getInfo() {
      return {
        id: this.id,
        server: this.serverName,
        type: this.type,
        state: this.state,
        config: {
          localHost: this.config.localHost,
          localPort: this.config.localPort,
          remoteHost: this.config.remoteHost,
          remotePort: this.config.remotePort
        },
        stats: this.stats,
        created: this.createdAt,
        lastActivity: this.lastActivity,
        activeConnections: this.connections.size
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('List') but doesn't describe what 'active' means, how results are formatted (e.g., list of tunnel IDs, statuses), whether it's read-only (implied but not explicit), or any limitations (e.g., pagination, permissions). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, efficient sentence ('List active SSH tunnels') that front-loads the core purpose without unnecessary words. It earns its place by clearly stating the action and target, making it easy to scan and understand immediately.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data about SSH tunnels. It doesn't explain what information is listed (e.g., tunnel IDs, ports, statuses) or how to interpret results. For a list operation with no structured output documentation, more context is needed to make it fully usable by an agent.

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?

The input schema has 100% description coverage, with the single parameter 'server' documented as 'Filter by server name'. The description doesn't add any meaning beyond this, as it doesn't explain how filtering works or provide examples. With high schema coverage, the baseline score of 3 is appropriate, as the schema already handles parameter documentation adequately.

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 'List active SSH tunnels' clearly states the verb ('List') and resource ('active SSH tunnels'), making the purpose immediately understandable. It distinguishes from siblings like ssh_tunnel_create and ssh_tunnel_close by focusing on listing rather than creating or closing tunnels. However, it doesn't explicitly differentiate from ssh_session_list, which might be a related but distinct concept.

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 active tunnels), exclusions, or comparisons to sibling tools like ssh_session_list or ssh_connection_status that might overlap in functionality. The agent must infer usage from the tool 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/bvisible/mcp-ssh-manager'

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