Skip to main content
Glama
ranson21

kube-diagnostics-mcp

by ranson21

summarize_log_errors

Group Kubernetes error logs by exception signature with counts and redacted samples. Optionally include warnings to quickly diagnose recurring issues instead of reading raw logs.

Instructions

Groups ERROR (and optionally WARN) log lines by signature (Java stack traces by exception + first app frame) with counts, first/last seen, and one redacted sample each. Read this instead of raw logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podNoExact pod name (alternative to service)
sinceNoTime window like 15m, 2h, 1d (default 1h)
serviceNoWorkload name as you would say it: a Deployment, StatefulSet, DaemonSet, Service, or Pod name
namespaceNoKubernetes namespace (required: no default configured; see list_namespaces)
include_warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that it groups by signature, provides counts, first/last seen, and one redacted sample each, which is useful. However, it does not mention the required namespace parameter (though the schema does), potential performance characteristics, or whether results are sorted or limited. The redaction detail is a positive, but more behavioral context (e.g., read-only nature, output format details) would be expected.

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 single, efficient sentence that front-loads the action and outcome. It includes the essential detail (redacted samples, counts, time window implication) without waste. Every word contributes to understanding the tool's purpose and 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?

The description explains the tool's core behavior and output fields (counts, first/last seen, redacted sample). It distinguishes from raw logs and implies a read-only summary. While it doesn't mention required namespace or the pod/service alternative, those are covered in the schema. For a moderate-complexity tool with no output schema and no annotations, this is adequate, though a bit more on output structure or sorting would push it higher.

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 80%, so the schema already documents most parameters. The description does not add extra meaning beyond what the schema provides; it only implies 'optionally WARN' which maps to include_warnings but doesn't explicitly tie it. The schema covers pod/service/namespace well, so the description adds little value here. Baseline 3 is appropriate.

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 states a specific verb ('Groups') and resource ('ERROR and optionally WARN log lines'), with a clear outcome (signature-based grouping with counts, first/last seen, redacted samples). It explicitly differentiates from raw logs by saying 'Read this instead of raw logs', which distinguishes it from the sibling get_logs.

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

Usage Guidelines4/5

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

The description gives a clear directive ('Read this instead of raw logs') that tells the agent when to prefer this tool. It does not explicitly mention exclusions or alternatives like summarize_access_log, but the scope (error vs access logs) is implied. It would benefit from noting when raw logs are still needed (e.g., full details), but the guidance is clear enough.

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