Skip to main content
Glama

Get pod logs

get_pod_logs
Read-onlyIdempotent

Retrieve recent logs from a container in a Kubernetes pod by providing pod name and namespace; optionally adjust tail lines and inspect previous terminated containers.

Instructions

Fetch recent logs from a pod container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPod name
contextNokube-config context to target (defaults to current-context)
previousNoFetch logs from the previous terminated container
containerNoContainer name (defaults to first container)
namespaceYesNamespace
tailLinesNoLines from the end (default 200)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds only the word 'recent', which is redundant because the schema's tailLines property already documents the default of 200 lines from the end. No additional behavioral context (e.g., default container selection behavior) is disclosed.

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 a single, concise sentence that front-loads the core action ('Fetch recent logs') and the resource ('pod container'). Every word earns its place with no filler or redundancy.

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, the description plus the fully annotated schema and safety annotations provide enough to call it correctly. It lacks mention of the plain-text output format or potential log volume, but these are not critical for invocation correctness. A higher score would require the description to handle more operational nuance.

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?

Schema description coverage is 100%, so the structured data already documents all six parameters. The description's 'recent' loosely maps to tailLines but adds no new semantic meaning beyond what the schema provides. Baseline 3 is appropriate.

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 'Fetch recent logs from a pod container' uses a specific verb and resource, clearly distinguishing this from sibling tools like get_pod (pod metadata) and list_pods (enumeration). An agent can immediately identify what this tool does without opening the schema.

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 usage context is implied by the verb 'Fetch' and the resource 'logs', but the description does not explicitly state when to prefer this tool over alternatives, nor does it mention exclusions. Sibling tools like get_pod exist for other pod details, but no routing guidance is provided.

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