Skip to main content
Glama
ifindv
by ifindv

ssh_connect

Authenticate and create an SSH session to a remote server, enabling command execution, file transfer, and directory listing via the returned session ID.

Instructions

Establish an SSH connection to a remote server.

This tool creates a new SSH session that can be used for subsequent operations like command execution, file upload/download, and directory listing.

Args: params (ConnectInput): Validated input parameters containing: - host (str): Remote server hostname or IP address (e.g., "192.168.1.100", "server.example.com") - port (int): SSH port number, default 22, range 1-65535 - username (str): SSH username for authentication - password (Optional[str]): Password for authentication (alternative to private_key_path) - private_key_path (Optional[str]): Path to SSH private key file (alternative to password) - private_key_password (Optional[str]): Password for encrypted private key - timeout (int): Connection timeout in seconds, default 30, range 1-300 - session_id (Optional[str]): Session identifier, auto-generated if omitted

Returns: str: Session ID for the established connection or error message

Examples: - Use when: "Connect to server 192.168.1.100 with username admin" -> params with host="192.168.1.100", username="admin" - Use when: "Connect using SSH key" -> params with private_key_path="/path/to/key" - Don't use when: Session already exists (use ssh_status to check) - Don't use when: Need to execute multiple commands to different servers (create separate sessions)

Error Handling: - Returns error if authentication fails (check credentials) - Returns error if host is unreachable (check network) - Returns error if port is invalid or service not running

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Discloses session creation, return value (session ID or error), and error conditions (auth failure, unreachable host). Complements annotations (readOnlyHint=false, destructiveHint=false) with additional context.

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?

Well-structured with sections for purpose, args, returns, examples, and error handling. Every sentence is informative, and the description is appropriately concise for a complex tool.

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

Completeness5/5

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

Covers all necessary aspects: purpose, parameters, return values, error handling, and usage boundaries. References sibling tools and provides complete guidance for an SSH connection tool.

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

Parameters5/5

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

The 'Args' section fully explains each parameter, including defaults, constraints, and relationships (e.g., password as alternative to private_key_path). Adds value beyond schema descriptions with examples and ranges.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Establish an SSH connection to a remote server' and explains it creates a session for subsequent operations, distinguishing it from sibling tools like ssh_disconnect or ssh_execute.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use when' and 'Don't use when' examples are provided, including alternatives like ssh_status to check existing sessions and guidance for multiple servers.

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

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