Skip to main content
Glama
claude-log-analyzer

claude-log-analyzer

fetch_pod_logs

Fetch and filter Kubernetes pod logs by namespace, pod, container, or label; remove health-check/probe noise and surface severity in summarized results to reduce token usage.

Instructions

Fetch and filter pod logs. Intelligently filters noise (health checks, probes) and extracts severity. Returns summarized results to minimize token usage.

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": {
      "namespace": "<namespace>"
    },
    "name": "fetch_pod_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
podNameNoSpecific pod name
namespaceYesKubernetes namespace
tailLinesNoMax log lines per pod
grepPatternNoRegex pattern to filter log lines
sinceSecondsNoFetch logs from last N seconds
containerNameNoSpecific container name
labelSelectorNoLabel selector (e.g. app=nginx)
severityFilterNoFilter by log severity level (default: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the most important non-obvious trait: output is noise-filtered and summarized, so the agent will not receive raw full logs. It does not cover access requirements, behavior for missing pods, or how summarization/truncation works, leaving some gaps for a mutation-free but access-sensitive tool.

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?

Three short sentences, front-loaded with purpose and then behavior, with no filler. 'Intelligently filters noise' is slightly promotional but immediately backed by concrete examples (health checks, probes).

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 an 8-parameter read tool with a fully documented schema and no output schema, the description supplies the crucial missing piece: that results are summarized to save tokens. It is nearly complete, with the only remaining gap being access/prerequisite context and error behavior.

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 the schema already explains all eight parameters including the severityFilter enum and grepPattern. The description adds no parameter-level detail beyond the general idea of filtering, which the schema covers better; baseline 3 applies.

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?

States a specific verb and resource ('Fetch and filter pod logs') and adds the filtering/severity-extraction angle that separates it from sibling tools such as get_pod_status or get_events. It is clear what the tool does, though it does not explicitly name the siblings it is not.

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 only implied: log inspection is the obvious context, but the description gives no when-to-use vs when-to-prefer-alternatives guidance (e.g. versus get_events or get_root_cause_analysis) and no prerequisites such as cluster access. An agent can infer the scenario but not the routing decision.

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