Skip to main content
Glama
TMYTiMidlY

portal-mcp-server

by TMYTiMidlY

remote_tunnel

Open, close, and list SSH tunnels for local port forwarding, reverse port forwarding, and SOCKS5 proxies.

Instructions

Manage SSH tunnels — a single entry point (like hosts) where action selects the operation and the other args parameterise it.

Actions

  • action="open": open a tunnel through host. kind picks the type:

    • kind="local" : forward localhost:local_port → remote_host:remote_port via host. Required: remote_host, remote_port (local_port 0 = auto). Example: remote_tunnel(action="open", kind="local", host="bastion", local_port=5432, remote_host="db.internal", remote_port=5432)

    • kind="reverse": expose local_bind:local_port to host as host:remote_port. Required: remote_port, local_bind, local_port. Example: remote_tunnel(action="open", kind="reverse", host="bastion", remote_port=8080, local_bind="127.0.0.1", local_port=3000)

    • kind="socks" : SOCKS5 proxy on localhost:local_port via host. Required: local_port (default 1080). Example: remote_tunnel(action="open", kind="socks", host="bastion", local_port=1080)

    Returns {tunnel_id, type, host, local, remote}.

  • action="close": close a live tunnel. Required: tunnel_id (from open). Example: remote_tunnel(action="close", tunnel_id="ab12cd34")

  • action="list": list all active tunnels (JSON array).

Tunnels are a resource you manage explicitly (open → close), so list lives here rather than in inspect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo
kindNolocal
actionYes
tunnel_idNo
local_bindNo127.0.0.1
local_portNo
remote_hostNo
remote_portNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.3

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses defaults (local_port 0 = auto, socks default 1080), required arguments per kind, and the return shape. It omits permission/auth requirements, failure behavior, and whether tunnels persist or are torn down on close — gaps that matter for a connection-mutating tool.

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?

Front-loaded with the action selector, then organized under an 'Actions' heading with per-kind bullet detail and compact examples. Length is justified by the 8-parameter, three-mode surface; no filler sentences.

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?

Complete for a multi-action tunnel manager: all actions, kinds, required args, defaults, and an example are present, and the return shape is noted even though an output schema exists. An agent can invoke every mode correctly from the description alone.

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 description coverage is 0%, so the description must compensate and it does: it defines host, kind, action, tunnel_id, local_bind, local_port, remote_host, and remote_port with per-kind semantics and concrete examples. This is well beyond what the bare schema conveys.

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?

States a specific verb+resource ('Manage SSH tunnels') and enumerates the three operations via the action selector. It also explicitly distinguishes itself from the sibling 'inspect', explaining why 'list' lives here rather than there.

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?

Gives explicit when-to-use routing for each action and kind, including required parameter combinations per kind and the rationale that tunnels are an explicitly managed resource (open → close). The note about 'list' versus 'inspect' is exactly the sibling differentiation an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.