Skip to main content
Glama
faizbawa

mcp-remote-ssh

ssh_forward_port

Forward a local port to a remote host via SSH, tunneling connections through an existing session. Specify remote port and optionally local port or host.

Instructions

Create an SSH port forward (local -> remote). Connections to 127.0.0.1:local_port will be tunneled through SSH to remote_host:remote_port.

If local_port is 0, a random available port is chosen.

Args: session_id: The session ID returned by ssh_connect. remote_port: Port on the remote side to forward to. local_port: Local port to listen on (0 = auto-assign). remote_host: Host on the remote side (default: localhost, i.e. the SSH server itself).

Returns: Dict with forward_id, local_port, remote_host, and remote_port.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
remote_portYes
local_portNo
remote_hostNolocalhost

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description bears full burden. Describes connection tunneling and return value. Does not mention side effects or prerequisites (e.g., session must be active), but is reasonably transparent.

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 clear header, Args, and Returns sections. Every sentence adds value without redundancy. Appropriate length for a parameterized tool.

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

Completeness4/5

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

Covers purpose, all parameters, and return value. Lacks explicit mention of prerequisite (active SSH session via ssh_connect) but session_id parameter implies it. Overall sufficient for agent invocation.

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?

Schema coverage is 0%, but the description thoroughly documents all 4 parameters in an Args section, including defaults and meaning. Adds critical semantic value beyond the bare schema.

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?

Clearly states 'Create an SSH port forward (local -> remote)' and explains the tunneling behavior. Differentiates from siblings like ssh_close_forward, ssh_list_forwards by focusing on creation.

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

Usage Guidelines4/5

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

Provides guidance on local_port=0 for auto-assignment. Implicitly suggests usage for port forwarding, but does not explicitly state when not to use or mention alternatives like ssh_execute.

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

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