Skip to content

P2: stella-cli/stella-tui: render the MCP tool-truncation signal (residual of #638) #689

Description

@macanderson

Residual of #638, which closed with PR #685. Two of its three bullets shipped; this is the third.

What is missing

#638's acceptance criterion had three clauses. PR #685 delivered health-vs-connect failure separation (stella-mcp/src/client/health.rs) and the stderr ring (StderrTail), but not "knows when a tool list was truncated".

The signal is exposed and tested in stella-mcp, but nothing consumes it. Verified at 8a6babec:

rg -n "dropped_tool_count|over_advertising_servers" --type rust -g '!stella-mcp/**'
→ no matches

The accessors that exist and are unread:

  • McpClient::dropped_tool_countstella-mcp/src/client.rs:468
  • McpToolSet::over_advertising_serversstella-mcp/src/toolset.rs:352
  • McpToolSet::dropped_tool_countstella-mcp/src/toolset.rs:371

PR #685's body concedes it: "#638's truncation rendering is a stella-cli/stella-tui change; the signal is exposed and tested in stella-mcp."

Why it matters

The real silent cap is MAX_TOOLS_PER_SERVER = 256 (stella-mcp/src/client.rs). An over-advertising server loses tools past it and nothing tells the operator — the model just silently has fewer tools than the server offers. (MAX_TOOL_PAGES is not the problem; it fails loudly with "cursor never terminated".)

Where to render

  • Deck MCP tabstella-cli/src/command_deck.rs:1989 builds stella_tui::McpServerInfo; the tab currently surfaces only live/reconnecting/down. Likely a new McpServerInfo field.
  • Text mode — next to, but NOT inside, the failed_servers() loop at stella-cli/src/agent.rs:1485. That path renders as "server unavailable", which would be a lie here: the server is up and healthy, it just advertised more tools than we accept.

Acceptance

An over-advertising server produces a non-fatal, correctly-worded notice in both the deck's MCP tab and text mode, distinguishable from an unavailable server.

Note on #638's original text

#638's bullet C claimed dropped_tool_count/over_advertising_servers "do not exist anywhere in the tree". That was wrong when filed — both have existed since #551. Only the operator surface was ever missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Polish — worth doing, not urgentarea:clistella-cli — commands, flags, wiringarea:mcpstella-mcp — MCP client, external tool serversarea:tuistella-tui — REPL rendering, panels, input

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions