Skip to main content
Glama
razvanmacovei

Multi Cluster Kubernetes MCP Server

k8s_get_pod_logs

Get logs from a Kubernetes pod, with optional duration filter and logs from a previously terminated container. For multi-container pods, defaults to first container.

Instructions

Get logs from a Kubernetes pod. For multi-container pods, logs from the first container are returned by default. Use sinceDuration to filter (e.g., '5m', '1h', '2d'). Set previousContainer=True to get logs from the previously terminated container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podYes
contextYes
namespaceYes
sinceDurationNo
previousContainerNo
Behavior4/5

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

With no annotations, the description discloses key behaviors: for multi-container pods, logs from the first container are returned by default; sinceDuration format examples ('5m', '1h', '2d'); and the effect of setting previousContainer to true. It does not mention potential truncation or output format, but covers essential aspects.

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?

The description is three sentences long, immediately stating the core purpose, then providing key default behavior and parameter usage. Every sentence adds information without redundancy.

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?

Given the absence of annotations and output schema, the description should clarify the return format (e.g., streaming lines, complete logs) and any limitations (e.g., max lines). It omits this information, leaving gaps for the agent. However, for a simple log retrieval, the behavior is mostly inferable.

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

Parameters4/5

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

Schema coverage is 0%, so the description adds value by explaining the format of sinceDuration (e.g., '5m', '1h', '2d') and the usage of previousContainer ('get logs from the previously terminated container'). Other parameters (pod, context, namespace) are self-explanatory and need no further detail.

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?

The description clearly states the tool's purpose: 'Get logs from a Kubernetes pod.' It specifies the action (get) and resource (pod logs), and distinguishes from sibling tools like k8s_describe or k8s_pod_exec by focusing solely on log retrieval.

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?

The description implies usage for fetching logs but provides no explicit comparison to alternatives or when not to use this tool. It offers context on default behavior for multi-container pods but lacks guidance on choosing this over other log-related commands.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/razvanmacovei/k8s-multicluster-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server