Skip to main content
Glama

Get pod logs

get_pod_logs
Read-onlyIdempotent

Read a pod's container logs to troubleshoot. For crash-looping pods, set previous=true to fetch logs from the dead instance where the real error lies.

Instructions

Read a pod's container logs. For a crash-looping pod set previous=true to read the instance that already died -- that is where the real error is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pod_nameYes
previousNo
containerNo
namespaceNo
tail_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds useful behavioral context beyond annotations by explaining that `previous=true` reads logs from the already-died instance and that this is where the real error will be found. This is valuable operational nuance not present in the schema.

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 with no filler. The core purpose is front-loaded, and the most valuable operational hint about crash-looping is included efficiently. Every sentence earns its place.

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?

For a read-only log-fetching tool, this is largely complete: annotations cover safety, an output schema exists, and the description adds the key crash-loop guidance. Minor gaps remain around container selection and tail behavior, but these are either self-evident from the schema or low-risk defaults.

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

Parameters3/5

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

The schema has 0% description coverage, so the description must compensate. It meaningfully explains the `previous` parameter's purpose in crash-loop scenarios and implies the `container` parameter via 'container logs.' However, it does not clarify `namespace`, `tail_lines`, or multi-container behavior, leaving those to inference from parameter names and defaults.

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 states a specific verb and resource: 'Read a pod's container logs.' This clearly distinguishes the tool from siblings like get_pods, get_events, and get_deployment_status, making the purpose immediately identifiable.

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 scenario for using the `previous` parameter with a crash-looping pod, which is actionable guidance. It doesn't explicitly name alternative tools or state when not to use it, but the purpose is obvious enough that an agent can infer the appropriate use context.

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