Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_docker_inspect

Inspect a specific Docker container on a remote Linux host via SSH for image, state, health, restart policy, resource limits, networks, ports, mounts, and logs. Excludes environment variables.

Instructions

Inspects a SPECIFIC docker container, given by name or ID, on a remote Linux host via SSH. Returns a curated subset of docker inspect: image, entrypoint/cmd, state (status, exit code, OOMKilled, start/finish time, health check log), restart count and policy, memory/CPU limits, networks, ports, mounts and log driver. Environment variables are NOT returned. When the login user cannot reach the docker daemon (not root, not in the docker group), the command is run through passwordless sudo or doas (sudo -n / doas -n).

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

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
timeoutNo
key_pathNo
passwordNo
containerYes
accept_new_hostkeyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.1/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 the SSH transport, the curated subset returned, an explicit exclusion (environment variables are NOT returned), and a non-obvious privilege-escalation behavior (sudo -n / doas -n when the login user cannot reach the daemon). It does not state error behavior for a missing container, timeout semantics, or explicitly confirm the operation is side-effect free.

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?

Front-loaded with the verb and scope, then the return contract, then the privilege caveat — a sensible order with no filler. The long enumeration of returned fields is somewhat redundant given an output schema exists, which keeps it from a 5.

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

Completeness4/5

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

For an 8-parameter SSH-backed inspection tool with no annotations, the description covers the essentials: transport, authentication/privilege handling, what is and is not returned. Remaining gaps are host-key trust (accept_new_hostkey), timeout behavior, and failure modes for a nonexistent container, but the output schema relieves it of explaining return shape.

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 8 parameters, so the description must compensate and it does so only partially: it clarifies that container accepts a name or ID, that host is a remote Linux host reached over SSH, and that user is the SSH login user whose docker-group membership drives sudo fallback. Five parameters — port, timeout, key_path, password, and especially the security-relevant accept_new_hostkey — receive no explanation in either schema or description.

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 (Inspects), a specific resource (a SPECIFIC docker container identified by name or ID), and the execution context (remote Linux host over SSH). The emphasis on 'SPECIFIC' plus the curated-return enumeration separates it cleanly from list-oriented siblings such as get_docker_ps_all and from get_crictl_inspect, which targets containerd rather than docker.

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

Usage Guidelines4/5

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

The 'SPECIFIC' emphasis and the enumerated return payload make it clear this is the tool for per-container detail rather than enumeration, and the sudo/doas note tells the agent the call still works for non-privileged logins. It stops short of naming alternatives (e.g. get_docker_logs for logs, get_docker_ps_all for listing) or stating when not to use it.

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