Skip to main content
Glama

Diagnose Cluster Issues (12-Step RCA)

diagnose_cluster_issues
Read-onlyIdempotent

Runs automated 12-Step kubectl apply root-cause analysis across a cluster or namespace to pinpoint stalled workloads and reliability gaps, returning ranked root causes with remediation commands.

Instructions

Run automated 12-Step kubectl apply Root-Cause Analysis (RCA) across a cluster or single namespace to detect stalled workloads and reliability gaps.

Inspects pods, events, nodes, deployments, statefulsets, daemonsets, services, configmaps, network policies, and Helm releases, folding symptoms across Steps 1-12 (API authn/authz, controllers, kube-scheduler, kubelet mount/CNI/image-pull/runtime, readiness probes, and EndpointSlice routing) into ranked root_causes with severity, confidence, and copy-paste remediation_cmd values. Returns cluster_id, namespace, health_score, summary, step_counts, pipeline_stages, components, integrations (Helm/Argo CD/Prometheus), root_causes, and raw_issues. Omit namespace (null) to scan all non-system namespaces, or pass one namespace to scope.

Use as the primary automated troubleshooting tool when investigating unhealthy workloads, CrashLoopBackOff, ImagePullBackOff, Pending pods, or unready services. Prefer get_workloads_overview for raw healthy/unhealthy counts without RCA folding, or get_pod_details and get_pod_logs to drill into a specific flagged pod.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster_id": "<cluster_id>"
    },
    "name": "diagnose_cluster_issues"
  }
}

Input Schema

NameRequiredDescriptionDefault
namespaceNoOptional Kubernetes namespace name (1-63 chars) to scope results to a single namespace. Omit or pass null to query across all non-system namespaces (system namespaces such as kube-system are excluded by default).
cluster_idYesUnique KubeOrbit cluster identifier returned by `list_teams_and_clusters` (1-63 URL-safe chars, e.g. 'gke-prod-us', 'eks-staging').

Output Schema

NameRequiredDescriptionDefault
summaryNoHigh-level RCA rollup: overall_score, active_root_causes, active_failures_count, workloads_healthy, and workloads_total.
namespaceNoScoped namespace scanned, or null when scanning all non-system namespaces.
simulatedNoFalse for live cluster scans.
cluster_idNoCluster identifier scanned.
componentsNoPer-Kubernetes-component (apiserver, scheduler, kubelet, probes, datapath) issue counts.
raw_issuesNoUnfolded individual findings underlying `root_causes`.
root_causesNoFolded, ranked root causes with kind (active_failure/best_practice), step_number, severity, confidence, root_cause, affected resources, and remediation_cmd.
step_countsNoActive failure counts keyed by `kubectl apply` pipeline step number (1-12).
folded_countNoNumber of deduplicated root-cause groups.
health_scoreNoOverall 0-100 cluster/namespace reliability health score.
integrationsNoDetected delivery/observability pipelines (Helm, Argo CD, Prometheus) for the scanned scope.
total_issuesNoTotal unfolded raw findings detected.
pipeline_stagesNoGrouped 12-Step pipeline stage statuses (healthy, warning, critical) with failure and advisory counts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.1
    • addedInput schema / properties / cluster_id / description
      Added value: +"Unique KubeOrbit cluster identifier returned by `list_teams_and_clusters` (1-63 URL-safe chars, e.g. 'gke-prod-us', 'eks-staging')."
    • addedInput schema / properties / cluster_id / maxLength
      Added value: +63
    • addedInput schema / properties / cluster_id / minLength
      Added value: +1
    • addedInput schema / properties / cluster_id / pattern
      Added value: +"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,62}$"
    • changedInput schema / properties / namespace / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 63,
      +    "minLength": 1,
      +    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,62}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / namespace / description
      Added value: +"Optional Kubernetes namespace name (1-63 chars) to scope results to a single namespace. Omit or pass null to query across all non-system namespaces (system namespaces such as kube-system are excluded by default)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "cluster_id": {
      +      "default": "",
      +      "description": "Cluster identifier scanned.",
      +      "title": "Cluster Id",
      +      "type": "string"
      +    },
      +    "components": {
      +      "description": "Per-Kubernetes-component (apiserver, scheduler, kubelet, probes, datapath) issue counts.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Components",
      +      "type": "array"
      +    },
      +    "folded_count": {
      +      "default": 0,
      +      "description": "Number of deduplicated root-cause groups.",
      +      "title": "Folded Count",
      +      "type": "integer"
      +    },
      +    "health_score": {
      +      "default": 100,
      +      "description": "Overall 0-100 cluster/namespace reliability health score.",
      +      "title": "Health Score",
      +      "type": "integer"
      +    },
      +    "integrations": {
      +      "additionalProperties": true,
      +      "description": "Detected delivery/observability pipelines (Helm, Argo CD, Prometheus) for the scanned scope.",
      +      "title": "Integrations",
      +      "type": "object"
      +    },
      +    "namespace": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Scoped namespace scanned, or null when scanning all non-system namespaces.",
      +      "title": "Namespace"
      +    },
      +    "pipeline_stages": {
      +      "description": "Grouped 12-Step pipeline stage statuses (healthy, warning, critical) with failure and advisory counts.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Pipeline Stages",
      +      "type": "array"
      +    },
      +    "raw_issues": {
      +      "description": "Unfolded individual findings underlying `root_causes`.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Raw Issues",
      +      "type": "array"
      +    },
      +    "root_causes": {
      +      "description": "Folded, ranked root causes with kind (active_failure/best_practice), step_number, severity, confidence, root_cause, affected resources, and remediation_cmd.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Root Causes",
      +      "type": "array"
      +    },
      +    "simulated": {
      +      "default": false,
      +      "description": "False for live cluster scans.",
      +      "title": "Simulated",
      +      "type": "boolean"
      +    },
      +    "step_counts": {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "description": "Active failure counts keyed by `kubectl apply` pipeline step number (1-12).",
      +      "title": "Step Counts",
      +      "type": "object"
      +    },
      +    "summary": {
      +      "additionalProperties": true,
      +      "description": "High-level RCA rollup: overall_score, active_root_causes, active_failures_count, workloads_healthy, and workloads_total.",
      +      "title": "Summary",
      +      "type": "object"
      +    },
      +    "total_issues": {
      +      "default": 0,
      +      "description": "Total unfolded raw findings detected.",
      +      "title": "Total Issues",
      +      "type": "integer"
      +    }
      +  },
      +  "title": "ClusterDiagnosticsOutput",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint true, destructiveHint false and openWorldHint false, so the safety profile is covered; the description adds real substance on top: the 12 diagnostic steps, which components are inspected, how symptoms are folded into ranked root causes with severity/confidence, and the namespace=null default that excludes system namespaces. The one residual ambiguity is the phrase 'kubectl apply', which reads like a write operation against a tool annotated read-only — an agent could wonder whether manifests are actually applied to the cluster, and the description never resolves that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The structure is good: purpose first, then what is inspected, then return shape, then usage routing — the reader is never hunting for the operation. It is dense but justified by the tool's complexity, with only minor waste in re-listing return fields that the output schema already declares.

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?

For a two-parameter but behaviorally complex detector, the description covers scope, inspection surface, folding logic, and sibling routing. The enumerated return fields (`cluster_id`, `health_score`, `step_counts`, `pipeline_stages`, `raw_issues`, etc.) are redundant given a declared output schema, and the read-only-versus-'kubectl apply' tension is left unaddressed, but nothing an agent needs in order to invoke it correctly is missing.

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 coverage is 100% and both parameters are fully documented in the input schema, so the baseline is 3. The description's 'Omit namespace (null) to scan all non-system namespaces, or pass one namespace to scope' largely restates what the namespace property description already says verbatim, adding no new format or constraint detail.

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 opens with a specific verb and scope: 'Run automated 12-Step kubectl apply Root-Cause Analysis (RCA) across a cluster or single namespace to detect stalled workloads and reliability gaps.' It enumerates the inspected resource types and the symptom classes folded into ranked root causes, so an agent knows exactly what this tool produces and how it differs from raw-count or per-pod siblings.

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?

It gives an explicit primary-use case ('when investigating unhealthy workloads, CrashLoopBackOff, ImagePullBackOff, Pending pods, or unready services') and names three alternatives with the condition that selects each: get_workloads_overview for raw counts without RCA folding, and get_pod_details/get_pod_logs to drill into a specific flagged pod. That is a complete routing rule for the most foreseeable decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.