Skip to main content
Glama

get_workload_logs

Read-only

Collects and aggregates error, warning, panic, and stack trace logs from all pods of a Kubernetes workload concurrently, with optional grep filtering and deduplication.

Instructions

Get aggregated logs from all pods of a workload (Deployment, StatefulSet, or DaemonSet). Logs are collected from all matching pods concurrently, then server-side filtered to errors, warnings, panics, and stack traces using deterministic regex patterns and deduplicated. Set grep for additional server-side filtering before that summary stage, like kubectl logs | grep PATTERN. More useful than get_pod_logs when you need logs across all replicas of a workload. 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
kindNoworkload kind: deployment, statefulset, or daemonset. Defaults to deployment when omitted.
namespaceYesworkload namespace
nameYesworkload name
containerNospecific container name, defaults to all containers
tail_linesNolines per pod (default 100)
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 the description adds significant behavioral details beyond that: logs collected concurrently, server-side filtering to errors/warnings/panics/stack traces with deterministic regex and deduplication, and grep for additional filtering. No contradictions with 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?

Three focused sentences: purpose, behavior with grep, and usage distinction. No redundant words, front-loaded with core purpose, each sentence adds value.

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?

Given the tool has 8 parameters, no output schema, and annotations cover readonly, the description covers the key behavioral aspects and usage context. It could mention return format but is sufficient for an AI agent to select and invoke correctly.

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 contextual meaning to parameters like grep ('like kubectl logs | grep PATTERN') and explains the filtering stages, which adds value beyond the schema descriptions.

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 it gets aggregated logs from all pods of a workload, specifies workload kinds (Deployment, StatefulSet, DaemonSet), and distinguishes from sibling get_pod_logs by saying it's for across replicas. The verb 'Get' with resource 'aggregated logs from all pods of a workload' is specific and unambiguous.

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?

The description explicitly says 'More useful than get_pod_logs when you need logs across all replicas of a workload' and provides a clear when-not: 'If the target is a config value, feature flag, CRD field, env ref, or YAML/spec content, use search rather than logs.' This gives direct guidance on alternatives.

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