Skip to main content
Glama

get_failure_details

Explain why a Kubernetes Job failed by inspecting pod exit states, Events, and log tails, then returning a synthesized root cause with supporting evidence.

Instructions

Explain why a Job failed. Finds its pods, reads container exit state, Kubernetes Events and a log tail (secrets masked), and returns a synthesized cause such as 'container OOMKilled at 340Mi, exit code 137' followed by the evidence.

Input Schema

NameRequiredDescriptionDefault
job_nameYesName of the failed Job (e.g. from get_run_history)
namespaceYesNamespace of the Job
tail_linesNoLog lines to return

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/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 well: it discloses the exact evidence gathered (pods, container exit state, Events, log tail) and a security-relevant behavior ('secrets masked'). It stops short of stating read-only safety, permissions needed, or latency/cost.

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?

Front-loaded with the purpose, then the mechanism, then the output shape. Dense but every clause adds distinct information with no filler.

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

Completeness5/5

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

No output schema exists, yet the description explains the return value precisely ('synthesized cause such as ... followed by the evidence'), closing the gap. Nothing critical for correct invocation is missing.

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%, so all three parameters (job_name, namespace, tail_lines) are already documented. The description adds nothing beyond the schema about parameter formats or defaults, so baseline 3 applies.

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?

States a specific verb+resource ('Explain why a Job failed') and enumerates the investigation it performs. Clearly distinguishable from sibling tools like get_run_history (which finds runs) or list_recent_failures.

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: use it to diagnose a single failed Job. However, it never states when to prefer it over find_silent_failures, list_recent_failures, or get_run_history, nor any prerequisites (e.g., job must still have pods).

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