Skip to main content
Glama

get_pod_logs

Read-only

Retrieve container logs from a pod. Use the previous flag to access logs from a crashed instance, aiding in debugging CrashLoopBackOff.

Instructions

Tail a container's logs. Set previous=true to read the prior (crashed) instance's logs — essential for CrashLoopBackOff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPod name.
linesNoHow many lines to tail (default 100).
contextNoKubeconfig context to target; omit for the server's default context.
previousNoRead logs from the previous, crashed container instance.
containerNoContainer name; required only for multi-container pods.
namespaceYesNamespace of the pod.
Behavior4/5

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

Annotations already confirm read-only and non-destructive behavior; the description adds valuable context about the previous flag and its role in crash debugging. It does not cover streaming/pagination, but the annotations lower the bar and the added context is meaningful.

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?

Two sentences, both necessary and directly informative. The first states the core action; the second gives a high-value usage tip without wasting words.

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?

With no output schema, the description and schema collectively provide enough for a logs tool: tailing behavior, line count, namespace/container targeting, and crash-instance option. Minor gap: no mention of output format, but that is generally implied and not critical for log retrieval.

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 covers 100% of parameters, so the baseline is 3, but the description enriches the 'previous' parameter by explaining its purpose and relevance to CrashLoopBackOff, which goes beyond the schema's bare definition. No other parameters need extra explanation given the schema quality.

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?

Description uses specific verb 'Tail' and names the resource 'container's logs', with a clear distinction from sibling tools like describe_pod or get_events. It also adds meaningful scope by mentioning 'previous (crashed) instance's logs', making the tool's purpose unmistakable.

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 description provides a clear context for using the previous flag ('essential for CrashLoopBackOff') and implies the tool is for reading logs. It does not explicitly compare to alternatives, but the log-specific context and sibling names make the usage clear enough.

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/deep-poharkar/kubeaid-mcp'

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