Skip to main content
Glama
mcp-root-cause-detective

mcp-root-cause-detective

by tarihte1110

analyze_kubernetes_pods

Read-onlyIdempotent

Correlate Kubernetes pod logs with cluster events like OOMKilled and CrashLoopBackOff to find failure causes, filtered by namespace, labels, pod names, and time.

Instructions

Kubernetes pod loglarını ve küme olaylarını (OOMKilled, CrashLoopBackOff) ilişkilendirir.

Args: namespace: Taranacak Kubernetes namespace'i (varsayılan 'default'). label_selector: İsteğe bağlı etiket filtresi (ör. 'app=payment'). pod_names: Açık pod adları listesi (boş bırakılırsa namespace içindeki podlar listelenir). tail_lines: Her poddan alınacak son log satırı sayısı. window_seconds: Korelasyon zaman penceresi (saniye). since: İsteğe bağlı zaman filtresi (ör. '30m', '2h'). include_events: True ise kubectl get events uyarı/hata olaylarını zaman çizelgesine ekler.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_kubernetes_pods"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNo
namespaceNodefault
pod_namesNo
tail_linesNo
include_eventsNo
label_selectorNo
window_secondsNo

Output Schema

NameRequiredDescriptionDefault
errorNo
warningsNo
analysis_idNoAşamalı inceleme (drill-down) araçlarında kullanılacak oturum kimliği.
error_spikesNo
sources_scannedNo
total_errors_foundNo
trace_correlationsNo
stacktrace_insightsNo
timed_entries_countNo
total_lines_scannedNo
root_cause_hypothesesNo
timeline_correlationsNo
unique_error_clustersNo
untimed_entries_countNo
mermaid_sequence_diagramNoÇoklu servis olay akışını görselleştiren Mermaid sequenceDiagram metni.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the description needn't restate safety. It adds real behavioral context beyond them: that logs and events are correlated into a timeline, that include_events pulls kubectl warning/error events, and that an empty pod_names list causes all pods in the namespace to be enumerated.

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 correlation purpose is front-loaded, followed by a structured Args block where each line is informative rather than filler. The formatting is slightly verbose but no sentence is wasted.

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?

With an output schema present, return values need not be described, and annotations cover the safety profile; the description fills the remaining gap by documenting all 7 parameters and the correlation model. Only the precedence between filtering options is left unstated.

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 description coverage is 0% across 7 parameters, so the description carries the full burden and largely meets it: every parameter is explained with meaning, the 'default' namespace fallback, format examples ('app=payment', '30m', '2h'), and the semantics of leaving pod_names empty. Only minor gaps remain, such as how label_selector interacts with pod_names when both are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: correlating Kubernetes pod logs with cluster events, and cites concrete signals (OOMKilled, CrashLoopBackOff). It is clearly distinguishable from siblings like analyze_docker_containers or analyze_log_files by resource, though it does not explicitly name an alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the resource and the documented args (e.g., include_events adds kubectl events to the timeline), so an agent can infer when it fits. However, there is no explicit statement of when to prefer this over analyze_log_files or diagnose_raw_stacktrace, and no prerequisites or exclusions are given.

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