Skip to main content
Glama

Read pod logs

k8s_read_pod_logs
Read-onlyIdempotent

Read Kubernetes pod logs to diagnose container issues, optionally targeting a specific container, previous instance, namespace, or recent time window.

Instructions

Read a pod's logs, optionally one container's or the previous instance's.

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_name": "<pod_name>"
    },
    "name": "k8s_read_pod_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
pod_nameYes
previousNo
containerNo
namespaceNo
tail_linesNo
since_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true and openWorldHint=true, so the safety profile is fully covered. The description adds one useful behavioral point, that logs from a previous (terminated) container instance can be retrieved, but never mentions default tail behavior, time-window filtering, or whether output is truncated.

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?

A single short sentence, front-loaded with the primary action and with zero redundant wording. Nothing is padding.

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?

For a seven-parameter log reader with no output schema and very thin schema coverage, this description is barely sufficient. Annotations handle the safety profile, but an agent still lacks guidance on pagination/tailing limits, time-window semantics, and how to choose this over the streaming sibling.

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 only 14%, so the description must carry most parameter meaning. It clarifies only container and previous; namespace, tail_lines (default 200) and since_seconds, which control scope and log volume, are left entirely undocumented in both schema and description.

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: 'Read a pod's logs'. It adds scope detail ('optionally one container's or the previous instance's'), but does not distinguish this from the closely named sibling k8s_stream_pod_logs, leaving the static-vs-streaming choice ambiguous from the description alone.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance. The mention of container and previous-instance selection describes parameters rather than tool selection, and the most relevant alternative (k8s_stream_pod_logs) is never named or contrasted.

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

Deploy Server

Other Tools