Skip to main content
Glama

diagnose

Read-only

Diagnose broken workloads or GitOps reconcilers by bundling resource info, logs, events, recent changes, and startup blockers to pinpoint root cause.

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
nameYesresource name
sinceNoonly fetch logs newer than this duration (e.g. 30s, 10m, 1h); empty = full available history
containerNospecific container; defaults to all containers across the workload's pods
namespaceYesresource namespace
tail_linesNolines per pod/container per stream (current AND previous), default 100
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false. The description adds valuable context beyond annotations: it discloses log stream capture (current AND previous), event filtering, exclusion of Secret content, and startupBlockers conditions. No contradiction 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?

The description is a dense but well-structured paragraph. It is front-loaded with the primary trigger, then methodically covers bundle contents, GitOps path, use cases, and alternatives. Every sentence contributes necessary context for a complex diagnostic tool.

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), the description is remarkably complete. It covers both workload and GitOps resource types, enumerates output sections, names failure scenarios, and directs to alternatives. No significant gaps.

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 baseline 3 applies. The description does not add significant new parameter-level meaning; it restates the kind options (workload vs GitOps) but the schema already documents each parameter adequately.

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 explicitly defines the tool's purpose: 'find the root cause / localize the failure' for broken workloads or GitOps reconcilers. It enumerates the exact data bundles included for workloads and GitOps resources, distinguishing it from sibling tools like get_resource or get_pod_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?

Provides explicit 'Use when' triggers with concrete scenarios (CrashLoopBackOff, OOMKills, etc.). Also gives clear exclusions: 'If you only need ONE facet... prefer the targeted tool' and 'For other CRDs or non-workload kinds, use get_resource'. This is exemplary guidance.

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