Skip to main content
Glama

diagnose

Read-only

Diagnose Kubernetes workloads and GitOps reconcilers to find root cause of failures. Bundles resource details, logs, events, and startup blockers in one round-trip.

Instructions

Use when the agent's decision is 'this workload or GitOps reconciler is broken — find the root cause / localize the failure'. For a single Pod/Deployment/StatefulSet/DaemonSet, bundles: the resource (Kubernetes-shaped detail) + diagnostic resourceContext (managedBy, exposes, selectedBy, uses, runsOn, issue/audit/policy rollups) + current AND previous container logs across the workload's pods + recent Warning events filtered to this resource + a recentChanges section for the workload and directly referenced ConfigMaps (no Secret content) + a startupBlockers section when the workload can't reach Running (unschedulable with the offending node constraint named, admission/quota rejection, or a post-bind CNI/volume stall). For Application/Kustomization/HelmRelease, returns the reconciler resource + GitOps status summary + related parsed issues (cause/action/remediation), without pod-log fan-out. Use for CrashLoopBackOff, OOMKills, failed deploys, image-pull errors, readiness flaps, scheduling failures, error-spewing services, GitOps sync/health failures, or any workload root-causing where you would otherwise call get_resource → events → get_pod_logs → get_pod_logs(previous=true) in sequence — this returns the same data in one round-trip. If you only need ONE facet (e.g. just spec, just logs), prefer the targeted tool. For other CRDs or non-workload kinds, use get_resource (with optional include=events).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYeskind to diagnose: a workload (pod, deployment, statefulset, daemonset) for logs+events+startup blockers, or a GitOps reconciler (application, kustomization, helmrelease) for sync/health summary + parsed failure cause
namespaceYesresource namespace
nameYesresource name
containerNospecific container; defaults to all containers across the workload's pods
tail_linesNolines per pod/container per stream (current AND previous), default 100
sinceNoonly fetch logs newer than this duration (e.g. 30s, 10m, 1h); empty = full available history
Behavior5/5

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

The description discloses all key behavioral traits: it bundles resource details, diagnostic context, current+previous logs, recent warnings, recent changes, startup blockers (for workloads), and GitOps status with parsed issues (for reconcilers). It explicitly states what it does NOT include (Secret content). This exceeds the annotations (readOnlyHint) by providing comprehensive insight into the tool's operation.

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 well-structured, starting with the core use case and then splitting into workload vs. GitOps reconciler behaviors. Every sentence adds value without redundancy. It is appropriately detailed for a complex tool without being verbose.

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?

Given the tool's complexity (6 parameters, no output schema) and the 24 sibling tools, the description leaves no gaps. It fully explains the return content for both resource categories, notes limitations (no Secret content), and provides guidance on alternatives. The absence of an output schema is compensated by thorough description of what is returned.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds significant context for the 'kind' parameter (listing exact resources and what behavior they trigger) and explains the optional parameters (container, tail_lines, since) beyond the schema. It clarifies defaults and behavior, elevating it above the baseline.

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's purpose: diagnosing broken workloads or GitOps reconcilers by bundling multiple data sources. It specifies the types of resources (Pod, Deployment, StatefulSet, DaemonSet for workloads; Application, Kustomization, HelmRelease for GitOps) and distinguishes from sibling tools like get_resource or get_pod_logs. The verb 'diagnose' plus detailed scope makes it highly specific.

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 provides explicit when-to-use scenarios (CrashLoopBackOff, OOMKills, etc.) and when-not-to-use ('If you only need ONE facet... prefer the targeted tool' and 'For other CRDs or non-workload kinds, use get_resource'). It also names alternatives, making the usage boundaries very clear.

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