Skip to main content
Glama

diagnose_k8s_workload

Read-onlyIdempotent

Collects a correlated incident snapshot for a Kubernetes workload (Deployment, StatefulSet, DaemonSet), verifying referenced ConfigMaps, Secrets, and PVCs, warning events, and automatically deduplicating container error logs.

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": {
      "parent": "<parent>",
      "kind": "<kind>",
      "name": "<name>"
    },
    "name": "diagnose_k8s_workload"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesRequired. The workload kind (e.g. Deployment, StatefulSet, DaemonSet, Job).
nameYesRequired. The name of the workload.
parentYesRequired. The cluster that owns the workload. Format: projects/{project}/locations/{location}/clusters/{cluster}
namespaceNoOptional. Optional namespace of the workload. Defaults to "default" if omitted.

Output Schema

NameRequiredDescriptionDefault
errorsNoErrors encountered during workload diagnosis.
resultNoJSON string representing the workload diagnostic snapshot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds real behavioral content: the tool fans out across multiple resource types and deduplicates container error logs, which an agent cannot learn from annotations. It stops short of disclosing scope limits (time window, log volume, what happens when a referenced ConfigMap/Secret is missing).

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?

A single front-loaded sentence with no filler; the enumerated outputs are the most useful part. It is dense but readable, and nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is unnecessary, and the aggregation behavior is conveyed. However, for a multi-source diagnostic tool there is no statement about the time range covered, result-size limits, or partial-failure behavior when a referenced object is absent.

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%, including the required parent path format and the namespace default, so the baseline is 3. The description adds nothing about parameters and slightly conflicts with the schema's kind list by omitting Job, which the schema explicitly allows.

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 ('Collects') and a precisely scoped resource ('correlated incident snapshot for a Kubernetes workload') and enumerates what is gathered: ConfigMap/Secret/PVC verification, warning events, and deduplicated error logs. This differentiates it in spirit from single-signal siblings like get_k8s_logs or list_k8s_events, though no sibling is named.

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?

The word 'incident snapshot' implies triage/diagnosis usage, but the description never states when to use this instead of get_k8s_logs + describe_k8s_resource + list_k8s_events, nor any prerequisite. Guidance is inferable rather than explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources