Skip to main content
Glama
DeepAgentLabs

deep-agentic-core-mcp

Official

Diagnose Run

lens.diagnose_run
Read-only

Diagnose trace run failures: identify faulty steps and agents, build incident timeline, detect anomalies, and generate investigation narrative for debugging.

Instructions

Diagnose a trace run: failure taxonomy, faulty step and agent with confidence and supporting spans, incident timeline, anomalies against optional baseline runs, and an investigation narrative. Needs agenticlens>=0.7.0.

Input Schema

NameRequiredDescriptionDefault
runYes
budgetNo
configNo
baselineNo
session_idNoSession to read/write shared state under. Defaults to 'default'.
include_narrativeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.5

TDQS

B3/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe, non-mutating operation, so the description isn't carrying the safety burden. It does add useful context beyond annotations: the exact diagnostic outputs returned and the agenticlens>=0.7.0 dependency requirement. It stops short of disclosing cost/latency of an investigation run or how baseline affects output.

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?

Two sentences, front-loaded with the verb and resource, no filler. The output enumeration is dense and reads as a run-on list, but every element is informative rather than padding.

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?

For a 6-parameter tool with nested objects and no output schema, the description does the right thing by spelling out the return contents. However, the three opaque object parameters and the passed-in run structure are left entirely unexplained, so an agent cannot construct a valid call without opening the schema.

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?

Schema description coverage is only 17% – only session_id is documented – and the description compensates weakly. It implies baseline ("optional baseline runs") and include_narrative ("investigation narrative"), but leaves run, budget, and config as untyped-in-practice objects with no explanation of their structure or purpose, which an agent cannot infer.

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?

"Diagnose a trace run" is a specific verb+resource, and the enumeration of outputs (failure taxonomy, faulty step/agent with confidence and spans, incident timeline, anomalies, narrative) makes the tool's job unambiguous. It does not, however, explicitly differentiate itself from close siblings like lens.compare_runs, lens.analyze_workflow, or lens.score_analysis, which overlap in scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool produces but gives no when-to-use or when-not-to-use guidance, no prerequisites, and no pointer to alternative lens.* diagnostic tools. The only conditional hint is "anomalies against optional baseline runs," which describes a feature rather than selection criteria.

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