Skip to main content
Glama

acr_diagnose_failure

Diagnose AI agent failure root causes by analyzing failed spans and error logs, scoped to a specific run or agent when needed.

Instructions

Diagnose the root cause of an agent failure by analyzing failed spans and error logs.

Args: run_id: Specific run ID to diagnose. If omitted, diagnoses the most recent failed run. agent_name: Optional agent name to narrow search when run_id is omitted.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "acr_diagnose_failure"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNo
agent_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does disclose one real behavioral rule: if run_id is omitted it diagnoses the most recent failed run, and agent_name only narrows the search in that case. It says nothing about cost/latency, whether an LLM analysis is invoked, permissions, or error modes when no failed run exists.

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?

One purpose sentence followed by a compact Args block; nothing is redundant and the core intent is front-loaded ahead of the parameter notes.

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 values need no explanation, and both parameters are covered behaviorally. For a diagnostic tool with no annotations, though, it omits what the diagnosis is grounded in beyond spans/logs and any preconditions for a meaningful result.

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

Parameters4/5

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

Schema coverage is 0% (both properties are undocumented bare strings), so the description must compensate — and it does, explaining run_id as a specific-run selector with a documented default fallback and agent_name as a scoping filter that only applies when run_id is absent. Format details (ID shape, agent name matching rules) are still missing.

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 outcome: "Diagnose the root cause of an agent failure by analyzing failed spans and error logs." That tells an agent exactly what the tool produces conceptually and how it differs from a plain trace fetch such as acr_get_run_trace, though no sibling is named explicitly.

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 by the word "failure" — it is for failed runs, not general inspection. There is no explicit when-to-use/when-not statement and no pointer to alternatives such as fetching a trace or listing runs first, so the agent must infer the routing from the tool name.

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