Skip to main content
Glama

get_pod_logs

Read-only

Retrieve diagnostically relevant log lines from a Kubernetes pod. Filter by grep pattern, tail lines, or previous container to troubleshoot errors, panics, and warnings.

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

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