Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_kubectl_logs

Read-only

Fetch recent log lines from a single Kubernetes pod over SSH, optionally retrieving logs from the previous crashed instance for CrashLoopBackOff; secret-like values are redacted.

Instructions

The last lines log lines of one pod (kubectl logs); previous=True for the crashed instance (CrashLoopBackOff). Values that look like secrets are redacted.

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

Input Schema

NameRequiredDescriptionDefault
podYes
hostYes
portNo
userYes
linesNo
sinceNo
timeoutNo
key_pathNo
previousNo
containerNo
namespaceNodefault
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

B3.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds a non-obvious behavioral trait — that secret-looking values are redacted from output — which materially affects how an agent should interpret results. It also explains the previous flag's crash-loop semantics. It omits the fact that the tool connects over SSH (host/user/port/key_path/password_env params imply remote auth) and says nothing about timeout behavior.

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 tight clauses with no filler, and the core operation is front-loaded before the crash-loop and redaction details. Slightly dense with backticked tokens, but every phrase carries information.

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?

With an output schema present, return values need no explanation, but a 13-parameter tool with 0% schema coverage needs far more than two parameters addressed. Key operational details — namespace scoping, container selection in multi-container pods, SSH credential parameters, and timeout semantics — are missing everywhere.

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 13 parameters, so the description must carry the explanatory burden and it does not. It clarifies only `lines` and `previous`, leaving host, user, port, namespace, container, since, timeout, key_path, password_env, and accept_new_hostkey entirely undocumented in either place.

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 and resource ('The last `lines` log lines of one pod (kubectl logs)'), which unambiguously identifies the operation as pod log retrieval via kubectl. It implicitly separates itself from container-runtime log siblings (docker/crictl) by naming kubectl, though it never routes explicitly.

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?

It gives one conditional usage rule — previous=True for the crashed instance (CrashLoopBackOff) — which is genuinely useful triage guidance. It offers no when-not guidance and never names an alternative (e.g., get_docker_logs, get_crictl_logs) for non-Kubernetes workloads, so selection between siblings is left to inference from the tool name.

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