Skip to main content
Glama

ssh_port_forward

Create an SSH tunnel for port forwarding to securely redirect network traffic. Supports local, remote, and dynamic forwarding.

Instructions

Create an SSH tunnel for port forwarding

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesForward type
localPortNoLocal port
sessionIdYesSession ID
remoteHostNoRemote host (for local/remote)
remotePortNoRemote port (for local/remote)
Behavior2/5

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

No annotations are provided, so the description must disclose side effects, prerequisites, and state changes. It only says 'create a tunnel' without explaining that it establishes a persistent forwarding, requires an active SSH session, or may modify session state. No return value or error behavior is mentioned. Lacks transparency for a mutating operation.

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 sentence, front-loaded with the action and purpose. It contains no fluff, repetition, or unnecessary detail. Efficient and appropriately sized.

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?

The tool has 5 parameters, no output schema, and no annotations. The description is too minimal to support correct invocation in all cases: it fails to mention that sessionId must refer to an existing session, that type determines the direction of forwarding, or what a successful creation returns. While the schema provides parameter names, it does not explain the operational context needed for an agent to confidently use the tool.

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?

Schema description coverage is 100% with each parameter having a brief description. The tool description adds no additional meaning beyond the schema's parameter titles and basic details. It does not clarify the interplay between type, localPort, remoteHost, and remotePort (e.g., which are required for each type). Baseline of 3 is appropriate since the schema covers all parameters, but the description adds minimal value.

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 (Create) and target (SSH tunnel) with the purpose (port forwarding), distinguishing it from sibling tools like ssh_connect and ssh_execute. It does not explicitly differentiate from ssh_close_forward but the verb 'create' makes that clear. Slightly generic but sufficient.

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?

No guidance is provided on when to use this tool versus alternatives such as ssh_connect, sftp_upload, or ssh_close_forward. The description does not mention prerequisites (e.g., an existing session via sessionId) or whether local/remote/dynamic types require different usage contexts. There is no 'when-to-use' or exclusion language.

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/XNet-NGO/ssh-mcp-server'

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