Skip to main content
Glama

Diagnose deployment failure

diagnose_deployment
Read-onlyIdempotent

Diagnose failed Kubernetes deployments by gathering pod states, container statuses, services, and warning events to identify the root cause and provide a suggested fix.

Instructions

Gather pods, container states, Services and warning events, and return a diagnosis: what is wrong, the evidence, the likely cause and a suggested fix. Recognises CrashLoopBackOff, ImagePullBackOff, Pending, OOMKilled, CreateContainerConfigError, failing probes, Services without endpoints and PVC problems. Call this whenever verify_deployment reports healthy=false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesNo
namespaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
healthyYes
summaryNo
findingsNo
namespaceYes
recent_eventsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses that this is a read-only diagnostic operation by saying it 'gathers' resources and returns a diagnosis, consistent with readOnlyHint=true and destructiveHint=false. It also adds useful behavioral context beyond the annotations by enumerating the specific failure modes it recognizes, such as CrashLoopBackOff, ImagePullBackOff, and Services without endpoints.

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?

Three sentences carry unusual density without filler: behavior, recognized failure modes, and the trigger condition. Every clause adds information an agent needs, and the description is front-loaded with the core diagnostic purpose before the mode list.

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 covers the output behavior, the common failure signatures, and the exact condition for invocation. The only notable gap is parameter guidance, but with optional parameters, a null default, and an output schema present, the tool is still largely safe to invoke. The description could add a sentence defining what `names` and `namespace` scope the diagnosis to, but the current level of context is useful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, and the description does not compensate for it: it never explains what `names` or `namespace` mean, what they can be omitted, or how they scope the diagnosis. An agent can infer that `namespace` is likely a Kubernetes namespace, but `names` is ambiguous and the default-null behavior is not described.

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 names a specific verb and resource: it gathers pods, container states, Services, and events, then produces a diagnosis. It clearly distinguishes itself from lower-level siblings like get_pods or get_deployment_status by describing its synthesis of evidence into a diagnosis, not just a raw listing.

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 trigger condition: 'Call this whenever verify_deployment reports healthy=false.' This decisively tells the agent when to invoke this tool instead of relying on the raw get_* siblings, and the reference to verify_deployment ties it to the verification workflow.

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