Skip to main content
Glama
deep-agentic-core-mcp

deep-agentic-core-mcp

Official

Diagnose Run

lens.diagnose_run
Read-only

Diagnose a trace run to classify failures, identify the faulty step and agent with confidence and spans, build an incident timeline, compare anomalies to baselines, write an investigation narrative.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "run": "<run>"
    },
    "name": "lens.diagnose_run"
  }
}

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.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is supplied. The description adds useful behavioral context: a version prerequisite (agenticlens>=0.7.0), the optional baseline comparison mode, and the fact that a narrative can be requested. It does not mention cost/latency of running a diagnosis or how the trace data is consumed, so it stays at a 3 rather than a 4.

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, then the enumerated outputs, with the version prerequisite last. Every clause carries information; the output list is long but each item is distinct and decision-relevant. Slightly dense but no real waste.

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?

With no output schema, the description usefully enumerates what the diagnosis returns, which compensates well on the return side. But for a 6-parameter tool with nested objects and only 17% schema coverage, the opaque required 'run' parameter and the 'budget'/'config' objects remain undefined, leaving the calling contract incomplete. Adequate, with clear gaps.

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% (just session_id), so the description carries the burden for the remaining five parameters. It explains baseline (optional comparison runs) and implicitly include_narrative, but the required 'run' object and the 'budget'/'config' nested objects are left totally unexplained — an agent cannot tell what fields 'run' expects. Partial compensation only.

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?

The description uses the specific verb 'Diagnose' and names the resource 'a trace run', then enumerates the concrete outputs (failure taxonomy, faulty step/agent with confidence and supporting spans, incident timeline, anomalies, narrative). That detail makes it clearly not the same as compare_runs or analyze_workflow. It stops short of explicitly naming which sibling to use instead, so it is not a 5.

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?

The prerequisite 'Needs agenticlens>=0.7.0' is a genuine use condition, and 'anomalies against optional baseline runs' implies when to supply baseline. However, there is no statement of when to prefer this tool over siblings such as lens.compare_runs or lens.analyze_workflow, and no exclusions. Usage is implied rather than stated.

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