Skip to content

Quarantined servers' tools are still counted as "available" in tool_count, /api/v1/tools and the Servers page #1064

Closed

Description

@Dumbris

Summary

A quarantined server keeps reporting its tools as available. tool_count stays at its pre-quarantine value, GET /api/v1/tools returns every one of them, and the Servers page renders the total under the label "Available across all servers" — while the BM25 index, correctly, returns nothing for that server and every call to those tools is refused.

So two surfaces that describe the same catalog disagree, and the one an operator reads is the wrong one.

Reproduction

Verified on main @ 99c721a (with #1062 applied), isolated instance, scratch --config and --data-dir, one @modelcontextprotocol/server-memory upstream.

# connected, not quarantined
servers:  memory  q=False en=True  status=ready  tools=9
GET /api/v1/tools                 -> 9
GET /api/v1/index/search?q=entities -> 9

# POST /api/v1/servers/memory/quarantine
servers:  memory  q=True  en=True  status=ready  tools=9     <-- unchanged
GET /api/v1/tools                 -> 9                        <-- unchanged
GET /api/v1/index/search?q=entities -> 0                      <-- correctly purged

Calls to those nine tools are refused with 🔒 SECURITY BLOCK: Server 'memory' is currently in quarantine.

In the Web UI the same state renders as Total Tools 9 — Available across all servers on the Servers page, and 9 Tools in the header chip, beside a card that says Quarantined — needs security review.

Why the existing guard misses it

handleGetGlobalTools (internal/httpapi/server.go:3186) already reasons about this and covers the neighbouring case:

Use the same management-service path as the per-server tools endpoint so behaviour is consistent: a disabled / not-connected server returns an empty tool set (NOT an error), so it contributes zero tools without being mislabelled as a failed server.

That is accurate, and I verified the disabled half works — disabling drops tool_count to 0 and /api/v1/tools to 0.

Quarantine is neither of those things. A quarantined server stays connected and status: ready — that is deliberate, since the tray and Web UI need to inspect it for review. So it passes the disabled/not-connected guard untouched and its tools are counted as available.

Scope note / correction to the merged audit

docs/qa/ux-audit-webui-2026-08.md (merged in #1046) records this as "quarantined and disabled". That is wrong on the disabled half — measured above. Happy to send a one-line doc fix alongside whatever fixes this.

Suggested fix

Treat quarantine like disable at the counting surfaces: exclude a quarantined server's tools from tool_count, from GET /api/v1/tools, and therefore from the Servers-page total and the header chip.

Worth considering as the general form, since this is the second instance of the same shape after #1061: derive "available" from one predicate used by every surface, rather than each surface re-deriving it from a different field. The index already gets this right because #1061's fix put the purge on the state transition; the counting surfaces still ask "is it disabled or disconnected".

Not this issue

Tool descriptions are not exposed here — /api/v1/tools returns names and metadata for a quarantined server, and the index (the description-bearing search path) is correctly empty. This is a trust-and-accuracy defect, not the disclosure #1061 was.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/web-uiVue 3 web dashboard (frontend/)kind/bugSomething isn't workingpriority/mediumImportant but not blocking a release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions