Skip to main content
Glama

list_recent_failures

List recent Kubernetes Job failures across one or all namespaces, newest first, with a synthesized cause and whether the same CronJob later succeeded.

Instructions

List Jobs that failed in the last N hours (one namespace or all), newest first, each with a synthesized cause (e.g. OOMKilled, exit code, image pull, deadline) and whether a later run of the same CronJob has succeeded since. Includes Jobs not created by a CronJob. Use get_failure_details for logs and events of one failure.

Input Schema

NameRequiredDescriptionDefault
hoursNoLook back this many hours
limitNoMax failures to inspect and return
namespaceNoNamespace to scan; omit for all namespaces

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/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 substantial work: it discloses ordering (newest first), the derived fields returned, and the non-obvious scope fact that Jobs not created by a CronJob are included. It omits that `limit` can truncate the inspection set and says nothing about read-only semantics, but 'List' makes the safety profile self-evident.

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?

Two sentences, front-loaded with scope and result shape, then the disambiguation pointer. Every clause carries information — the OOMKilled/exit-code examples and the 'not created by a CronJob' note each prevent a real misread. No filler.

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?

There is no output schema, so the description must carry return semantics, and it does by enumerating the synthesized cause and the later-success flag. For a three-param read tool with full schema coverage this is nearly complete; only truncation behavior under `limit` is left unstated.

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 `hours`, `limit`, and `namespace` are already fully documented, and the description adds nothing new — its 'last N hours' and 'one namespace or all' phrasing merely restates the schema. Baseline 3 is correct; `limit`'s interaction with truncation is not clarified in either place.

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 and resource ('List Jobs that failed in the last N hours'), plus scope (one namespace or all) and exact return contents (synthesized cause, later-CronJob-success flag). It also carves out a niche the agent can distinguish from siblings by naming get_failure_details. This is a precise, non-tautological purpose statement.

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?

Explicitly routes the agent to get_failure_details for logs/events of a single failure, which is the key adjacent use case. However, it never contrasts with find_silent_failures or get_run_history, both of which plausibly overlap, so the agent must infer which of those to pick. Clear context, but incomplete alternative routing.

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