Skip to main content
Glama

get_pod_logs

Retrieve stdout and stderr log lines from a Kubernetes pod for diagnostic analysis. Use to investigate application crashes, HTTP 500 errors, or startup exceptions.

Instructions

Extract stdout and stderr log streams from a pod container for diagnostics.

Usage Guidelines

  • Use when investigating application crashes, HTTP 500 errors, or startup exceptions.

  • Keep tail_lines small (e.g. 50–200) to avoid overloading LLM token context.

Behavioral Transparency

  • Read-only query.

  • Returns raw text log lines or a descriptive error if the pod or container does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pod_nameYesExact identifier name of the pod whose logs should be extracted (e.g. 'nginx-7854ff8877-abcde').
containerNoSpecific container name within a multi-container pod. If omitted, Kubernetes selects the primary container.
namespaceNoKubernetes namespace where the target pod resides. Defaults to 'default'.default
tail_linesNoNumber of most recent log lines to fetch. Constrained between 1 and 2000. Defaults to 100.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Despite no annotations, the description fully discloses behavior: it is a read-only query, returns raw text log lines, and gives a descriptive error for nonexistent pods or containers. It also explains the default container selection behavior when omitted.

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 concise and well-structured with clear sections for usage guidelines and behavioral transparency. Every sentence contributes useful information without redundancy or unnecessary elaboration.

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

Completeness5/5

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

The description provides sufficient context for correct usage: when to use, parameter defaults and constraints, behavior details, and error semantics. It is fully self-contained for an agent to invoke the tool appropriately.

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

Parameters5/5

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

Schema coverage is 100%, and the description adds meaningful context beyond the schema, such as the primary container selection when container is omitted, namespace defaulting, and the bounded range of tail_lines. This enriches the parameter understanding.

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?

Clearly states the tool extracts stdout and stderr log streams from a pod container for diagnostics, with a specific verb and resource. Distinct from sibling tools that list resources or events, making its purpose unambiguous.

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

Usage Guidelines5/5

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

Explicitly provides when to use the tool (investigating crashes, HTTP 500 errors, startup exceptions) and offers practical guidance to keep tail_lines small to avoid token overload. This leaves no ambiguity about appropriate invocation contexts.

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

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/akkireddy-challa/k8s-mcp-server'

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