953 B
953 B
Track Specification: Tool Usage Analytics (tool_usage_analytics_20260306)
Overview
Analytics panel showing most-used tools, average execution time, failure rates.
Current State Audit
Already Implemented
ai_client.tool_log_callback: Called when tool executesmcp_client.dispatch(): Routes tool calls- No aggregation or storage
Gaps to Fill
- No tool usage tracking
- No execution time tracking
- No failure rate tracking
Functional Requirements
- Track tool name, execution time, success/failure
- Aggregate by tool name
- Display ranking by usage count
- Show average time per tool
- Show failure percentage
Key Integration Points
| File | Purpose |
|---|---|
src/ai_client.py |
Hook into tool_log_callback |
src/gui_2.py |
Analytics panel rendering |
Acceptance Criteria
- Tool ranking displayed
- Average times accurate
- Failure rates tracked
- 1-space indentation