Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

check_tcp_connect

Read-only

Tests whether a TCP connection from an SSH host to a specified target host and port opens, helping diagnose reachability and firewall issues.

Instructions

Whether a TCP connection from the host to target_host:target_port opens (nc -vz). host/port are the SSH connection, not the target.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target_host": "<target_host>",
      "target_port": "<target_port>",
      "host": "<host>",
      "user": "<user>"
    },
    "name": "check_tcp_connect"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
timeoutNo
key_pathNo
target_hostYes
target_portYes
password_envNo
accept_new_hostkeyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • removedInput schema / properties / password
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedInput schema / properties / password_env
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed1 schema field changedv0.3.3
    • changedInput schema / properties / timeout / default
      Previous value: -20New value: +60
  3. Addedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

With only readOnlyHint=true given, the description still contributes real behavioral context: it reveals the check runs from the SSH host (host/port are the connection, not the target), which changes how the agent should interpret results — a connection failure may be the remote host's view, not the caller's. It does not mention auth requirements for the SSH connection or failure modes, so it stops short of full disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, with the core purpose front-loaded and the critical disambiguation immediately after. The brevity is close to over-terse for a 9-parameter tool, which keeps it from a 5.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the conceptual model of the tool is simple. Still, for 9 parameters with no schema descriptions, the definition leaves credential-related inputs and timeout behavior entirely unexplained, which is a meaningful gap for an agent constructing the call.

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 0% across 9 parameters, so the description carries the burden and does resolve the most confusing ambiguity — the host/port vs target_host/target_port split across four of the nine params. It says nothing about timeout, key_path, password_env, accept_new_hostkey, or the default SSH port, leaving half the surface undocumented in both places.

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 names a specific verb+resource (checking whether a TCP connection opens) and even gives the underlying mechanism, nc -vz, so the agent knows exactly what is being tested. It does not, however, distinguish itself from the sibling check_http, which an agent might reasonably consider for a similar probe.

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

Usage Guidelines3/5

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

Usage is implied by the purpose statement, and the second sentence preempts the biggest misuse risk by telling the agent that host/port are the SSH jump connection rather than the probe target. There is no explicit when-to-use/when-not guidance and no named alternative, so guidance remains implicit.

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