Skip to main content
Glama

ssh_tunnel_close

Tears down active SSH tunnels to free local ports. Specify a single tunnel by ID or close all tunnels for a given server.

Instructions

Tears down active SSH tunnels created earlier, freeing the bound local ports; this affects only local tunnel state, not the remote host. Exactly one of tunnelId or server must be supplied: tunnelId closes that single tunnel, while server closes every tunnel for the named server and reports how many were closed. Supplying neither raises an error. Closing is final and cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNoClose all tunnels for this server
tunnelIdNoTunnel ID to close
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: it affects only local state, closing is irreversible, and for the server option it reports count of closed tunnels. No contradictions.

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?

Three well-structured sentences: first states action and scope, second explains options, third warns about finality. Every sentence is necessary and informative—no redundancy.

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?

Given the tool's complexity (two optional but mutually exclusive parameters, no output schema), the description completely covers behavior, parameter constraints, and side effects. No gaps remain.

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 already has descriptions for both parameters (100% coverage), but the description adds essential context: the mutual exclusivity rule, that server closes all tunnels, and that the operation reports the number closed—significantly beyond 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?

The description uses 'tears down' as a specific verb for the 'ssh tunnels' resource, clearly distinguishing it from sibling tools like ssh_tunnel_create (creates) and ssh_tunnel_list (lists). It also clarifies scope ('affects only local tunnel state').

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?

Explicitly states that exactly one of tunnelId or server must be supplied, explains what each does, and warns that supplying neither raises an error. The finality ('cannot be undone') provides crucial guidance.

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/bysonte/ssh-manager-mcp-server'

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