{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/track-tool-errors-tool-calls-runtime-and-tokens-as-agent-diagnostics",
  "id": "MHC-D-RESEARCH-0958",
  "version": "0.1.0",
  "title": "Track tool errors, tool calls, runtime and tokens as agent diagnostics",
  "summary": "The path to the answer reveals inefficiency before users notice the bill or latency.",
  "kind": "checklist",
  "body": "Alongside task success, record number of tool calls, tool errors, runtime, token use and repeated calls. These metrics help detect confused tool selection, bloated responses, loops and regressions that final accuracy can hide.",
  "limits": [
    "Lower cost or fewer calls are not automatically better if they reduce robustness or coverage."
  ],
  "topics": [
    "union-agent-loop-reliability"
  ],
  "intents": [],
  "source_ids": [
    "RS-6E5D62426C731E4C"
  ],
  "evidence": [
    {
      "claim": "Anthropic recommends tracking runtime, tool-call count, token consumption and tool errors in addition to top-level accuracy.",
      "source_id": "RS-6E5D62426C731E4C",
      "role": "supports",
      "note": "Lower cost or fewer calls are not automatically better if they reduce robustness or coverage.",
      "locator": "See source record"
    }
  ],
  "use_when": [
    "Agent evaluation records only final pass/fail."
  ],
  "avoid_when": [
    "Lower cost or fewer calls are not automatically better if they reduce robustness or coverage."
  ],
  "example": "Two agents both pass, but one needs 7 tool calls and the other 48 with five schema errors; that difference deserves investigation.",
  "check": "Efficiency and failure-path regressions are visible even when final success stays constant.",
  "checklist": [
    "Count tool calls by tool.",
    "Count validation/tool errors.",
    "Track total runtime and major tool latency.",
    "Track token/context consumption.",
    "Flag repeated or redundant calls on successful tasks too."
  ],
  "sources": [
    {
      "id": "RS-6E5D62426C731E4C",
      "title": "Writing effective tools for AI agents—using AI agents",
      "url": "https://www.anthropic.com/engineering/writing-tools-for-agents"
    }
  ],
  "relations": [],
  "collections": [
    {
      "id": "RC-043A908C9263BF6A",
      "title": "Make the agent loop finish, recover and stay inspectable",
      "url": "/collections/make-the-agent-loop-finish-recover-and-stay-inspectable"
    }
  ]
}
