Skip to main content
Glama
samerfarida

MCP SSH Orchestrator

ssh_list_hosts

View all configured SSH hosts in your server fleet to manage access and monitor infrastructure connections.

Instructions

List configured hosts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'ssh_list_hosts' MCP tool. It lists all configured SSH hosts from the global Config instance and returns them in a JSON-compatible dictionary. Errors are caught and returned as sanitized strings. The @mcp.tool() decorator handles MCP registration.
    @mcp.tool()
    def ssh_list_hosts() -> ToolResult:
        """List configured hosts."""
        try:
            hosts = config.list_hosts()
            return {"hosts": hosts}
        except Exception as e:
            error_str = str(e)
            log_json({"level": "error", "msg": "list_hosts_exception", "error": error_str})
            return f"Error: {sanitize_error(error_str)}"
  • The @mcp.tool() decorator registers the ssh_list_hosts function as an MCP tool with FastMCP.
    @mcp.tool()
  • Imports helper utilities used by ssh_list_hosts: log_json for error logging and sanitize_error for safe error messages.
    from mcp_ssh.tools.utilities import (
        ASYNC_TASKS,
        TASKS,
        hash_command,
        log_json,
        sanitize_error,
    )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool lists hosts but doesn't disclose behavioral traits like whether it returns all hosts at once, requires authentication, has rate limits, or what format the output takes. This leaves significant gaps for a tool that interacts with SSH configurations.

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 with zero waste. It's front-loaded and gets straight to the point, making it easy for an agent to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and an output schema exists, the description is minimally adequate. However, with no annotations and sibling tools present, it lacks context about permissions, output format hints, or differentiation from alternatives, leaving room for improvement in guiding the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't add parameter details, but with no parameters, this is acceptable. It implies no filtering or options are needed, which aligns with the schema.

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 ('List') and resource ('configured hosts'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'ssh_describe_host' or 'ssh_ping', which prevents a perfect score.

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. With sibling tools like 'ssh_describe_host' (for details on a specific host) and 'ssh_ping' (for connectivity checks), the lack of context leaves the agent guessing about appropriate usage scenarios.

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/samerfarida/mcp-ssh-orchestrator'

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