Skip to main content
Glama

get_pod_logs

Read-only

Retrieve diagnostic logs from a specific pod, filtering for errors, panics, stack traces, and warnings. Supports optional grep, since, and previous container options for targeted debugging.

Instructions

Use only after narrowing to a specific Pod/container. Returns diagnostically relevant log lines (errors, panics, stack traces, warnings) or falls back to recent tail lines. Set grep to server-side filter like kubectl logs | grep PATTERN when you know an error string, request path, service name, or trace id. For broad incidents, first use issues, get_dashboard, search, list_resources, or get_neighborhood to avoid reading logs from many unrelated pods. If the target is a config value, feature flag, CRD field, env ref, or YAML/spec content, use search rather than logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceYespod namespace
nameYespod name
containerNocontainer name, defaults to first container
tail_linesNonumber of lines to fetch from the end (default 200)
grepNooptional regular expression to keep matching log lines before diagnostic filtering, like kubectl logs | grep PATTERN
sinceNoonly return logs newer than this duration (e.g. 30s, 10m, 1h), like kubectl logs --since
previousNoreturn logs from the previous terminated container instance (e.g. for CrashLoopBackOff diagnosis), like kubectl logs -p
Behavior5/5

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

Annotations already declare readOnlyHint=true, and description adds behavioral details: diagnostic filtering logic, fallback to tail lines, and server-side grep filter. No contradiction. Context goes beyond annotations.

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 front-loaded with crucial usage constraint, then core functionality, then parameter explanation, then alternatives. Every sentence serves a purpose with no redundancy.

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?

For a log retrieval tool with 7 parameters fully documented in schema, the description covers usage context, diagnostic behavior, filtering, and alternatives. No output schema, but return behavior is described sufficiently.

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 100%, so baseline is 3. The description adds extra semantics: explains grep as 'like kubectl logs | grep PATTERN', previous for CrashLoopBackOff diagnosis, and since as duration. This justifies a 4.

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 returns diagnostically relevant log lines (errors, panics, stack traces, warnings) or falls back to tail lines. It specifies the resource (pod/container) and scope, and distinguishes from siblings like 'search' and 'get_workload_logs'.

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?

Explicit guidance: 'Use only after narrowing to a specific Pod/container.' It provides when-not-to-use with alternatives for broad incidents ('issues, get_dashboard, search...') and for config/spec content ('use search rather than logs').

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/skyhook-io/radar'

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