Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_socket_summary

Read-only

Summarize TCP socket counts by state, port, process, and peer to diagnose connection leaks, port exhaustion, dead upstreams, and floods.

Instructions

TCP connections counted by state, port, process and peer: leaks (CLOSE-WAIT), port exhaustion (TIME-WAIT), dead upstreams (SYN-SENT), floods, full pools.

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": {
      "host": "<host>",
      "user": "<user>"
    },
    "name": "get_socket_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
hostYes
portNo
userYes
timeoutNo
key_pathNo
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. Addedv0.3.3

TDQS

B3.1/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read. The description adds real value beyond that by interpreting what the state counts mean (CLOSE-WAIT = leak, TIME-WAIT = exhaustion, SYN-SENT = dead upstream). It omits that this gathers data over SSH from a remote host and says nothing about auth requirements or result limits, which matter given key_path/password_env/accept_new_hostkey parameters.

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?

A single front-loaded sentence that wastes no words; the parenthetical state-to-symptom mappings are dense but each earns its place. Slight cost in readability from stacking five diagnostic scenarios into one clause chain.

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?

An output schema exists, so return values need not be explained. But this is an 8-parameter remote-host tool with zero schema descriptions, and the description never indicates it connects over SSH or how host/user/credentials interact — a genuine gap for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 8 parameters, so the description carries the full burden — and it explains none of them. 'Top' (presumably a result limit), timeout, port, and the entire SSH credential set (key_path, password_env, accept_new_hostkey) are undocumented in both schema and description. The 'by state, port, process and peer' phrase describes grouping dimensions, not parameters, so it does not compensate.

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 states a specific verb and resource — TCP connections counted by state, port, process and peer — and names the diagnostic signatures it surfaces (CLOSE-WAIT leaks, TIME-WAIT exhaustion, SYN-SENT dead upstreams). It is clearly distinct from the get_* host-info siblings, though it never explicitly contrasts itself with them.

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 through the problem framing: an agent can infer this is for diagnosing connection leaks, port exhaustion and upstream failures. There is no explicit 'use this when…' statement and no alternative tool is named for related questions, so the routing is left to inference.

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