Skip to content

Collapsible live tool usage panel — MCP servers, built-in tools, and native functions call stats #1788

@berrat

Description

@berrat

Describe the feature or problem you'd like to solve

During a session the agent invokes a wide variety of tools — MCP server tools, built-in tools (shell, file read/write, grep, glob), sub-agent launchers, and native functions — but there is no consolidated view of which tools have been called, how often, whether any failed, or how long they took. This information is buried in the scrollback or log files. For users debugging agent behaviour, optimising tool usage, or monitoring costs, a live at-a-glance tool usage panel would be invaluable.

Proposed solution

Add an optional Tool Usage panel — collapsible/expandable, opt-in via config — that shows a live, categorised summary of all tool invocations for the current session.

Folded (compact):

🔧 Tools  [24 calls · 1 error · 3 MCP · 8 built-in · 2 native]

Unfolded (expanded, grouped by category):

🔧 Tool Usage

  MCP Servers
    playwright      4 calls   ✔ 4   ✖ 0   avg 1.2s
    memory          2 calls   ✔ 2   ✖ 0   avg 0.1s
    git             3 calls   ✔ 2   ✖ 1   avg 0.8s  ⚠ 1 error

  Built-in Tools
    powershell      6 calls   ✔ 6   ✖ 0   avg 3.4s
    grep            4 calls   ✔ 4   ✖ 0   avg 0.2s
    glob            2 calls   ✔ 2   ✖ 0   avg 0.1s
    view            3 calls   ✔ 3   ✖ 0   avg 0.1s

  Sub-agents
    explore         2 calls   ✔ 2   ✖ 0   avg 8.1s
    task            1 call    ✔ 1   ✖ 0   avg 22.3s

  Native / Functions
    lsp             2 calls   ✔ 2   ✖ 0   avg 0.4s

Each row shows: call count, success/failure counts, and average duration. Rows with errors are highlighted. The panel updates live as tools are invoked.

Controls:

Example prompts or workflows

  1. Agent repeatedly fails on a git MCP tool — user spots ⚠ 1 error in the folded line without waiting for the agent to surface it.
  2. User notices powershell has been called 18 times in one turn — a signal the agent may be in a loop, prompting early intervention.
  3. Developer building a custom MCP server verifies their tool is being invoked the expected number of times and with the expected latency.
  4. User monitoring plan usage sees that explore sub-agents have been launched 6 times and adjusts their prompt strategy to consolidate searches.
  5. User keeps the panel folded — the one-line badge gives just enough signal (24 calls · 1 error) to catch problems without cluttering the screen.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions