Skip to content

feat(050): Global Tools overview page + CLI parity (#437)#481

Merged
Dumbris merged 9 commits into
mainfrom
050-global-tools-page
May 19, 2026
Merged

feat(050): Global Tools overview page + CLI parity (#437)#481
Dumbris merged 9 commits into
mainfrom
050-global-tools-page

Conversation

@Dumbris

@Dumbris Dumbris commented May 18, 2026

Copy link
Copy Markdown
Member

Related #437

What

A single Global Tools page listing every tool across all configured MCP servers — for auditing/curating large setups (12 servers ≈ 500 tools; some users ~700). Backed by a new consolidated endpoint, mirrored in the CLI for parity.

Replaces the previously orphaned, unrouted frontend/src/views/Tools.vue (dead grid/list code deleted).

Changes

Backend

  • storage.AggregateToolUsage(since) — single bounded reverse-cursor pass over the activity bucket (30-day window, no schema change, no new deps). Keyed server\x00tool so same-named tools on different servers don't collide.
  • GET /api/v1/tools — merges every server (incl. disabled) via a shared enrichServerTools helper (approval / disabled / config-denied, refactored out of the per-server handler) + usage fold-in. Uses the management-service path so a disabled/not-connected server yields an empty set, not a false partial. Tolerates per-server failures (partial + failed_servers, never 500s).
  • contracts.GlobalToolsResponse / GlobalToolsStats.

FrontendTools.vue rewritten Activity.vue-style: summary cards (Total/Enabled/Disabled/Pending), filter bar (substring search — never hides disabled/config-denied — + server/status/risk/approval), sortable paginated table, batch enable/disable with per-tool success/failure summary, schema modal. /tools route + WORKSPACE sidebar entry with live count badge. data-test hooks throughout.

CLI paritymcpproxy tools list now global when --server omitted (--status/--risk/--approval, -o json|yaml); new mcpproxy tools enable|disable <server:tool ...> batch with per-target summary + non-zero exit on any failure.

Docs/OAS — swagger regenerated (/api/v1/tools documented), docs/api/rest-api.md corrected (stale aspirational /tools search doc replaced with the real contract), CLAUDE.md + docs/cli-management-commands.md, E2E assertion added.

Testing

  • Storage table tests (empty / multi-server / window boundary / never-used / non-tool_call ignored) — -race green.
  • httpapi handler tests (merge, disabled-server inclusion, enrichment, partial-failure, usage degradation, empty) — green.
  • CLI command tests (arg parsing, grouping, filters, subcommands, exit codes) — green.
  • API E2E: GET /api/v1/tools shape + stats consistency assertion — pass.
  • Playwright sweep 5/5 (loaded table, search, sort, batch bar+disable, empty state) → self-contained report + screenshots in specs/050-global-tools-page/verification/report.html.
  • golangci-lint 0 issues; frontend build clean.

BM25 / retrieve_tools agent discovery is untouched (this is a separate audit surface).

Spec/plan/tasks/research/data-model/contract under specs/050-global-tools-page/.

🤖 Generated with Claude Code

Algis Dumbris added 6 commits May 18, 2026 21:10
Related #437

Single table-style page listing every tool across all configured MCP
servers, with substring search, server/state/risk/approval filters,
column sorting, and batch enable/disable. Replaces the orphaned Tools
view. Backend usage aggregation + consolidated tools payload.

Scope, data source, search approach, and v1 columns settled in
brainstorming with the user.
Related #437

Global tools page must have a CLI equivalent per the project's CLI/UI
parity pattern. Folded into spec 050 (same consolidated data source +
per-tool state change), not a separate spec.
Related #437

plan.md, research.md (6 decisions), data-model.md, contracts/global-tools-api.md,
quickstart.md. Constitution check passes (no violations). No new deps, no schema
change — reuses activity bucket + per-server enrichment loop.
Related #437

US1 (global listing/MVP), US2 (filter/sort/search), US3 (batch),
US4 (CLI parity). Phase 2 foundational = AggregateToolUsage + contracts.
Fan-out: backend / frontend / CLI agents after T007.
Related #437

Backend: storage.AggregateToolUsage (single bounded cursor pass over the
activity bucket, 30d window, no schema change); GET /api/v1/tools merging
all servers via a shared enrichServerTools helper + usage fold-in;
partial-server-failure tolerant. Frontend: Tools.vue rewritten
Activity.vue-style (cards, filters, sortable table, batch enable/disable,
schema modal); /tools route + sidebar badge. CLI: global tools list +
tools enable|disable <server:tool ...> batch. Docs/OAS/E2E updated.
Tests: storage + httpapi + CLI; lint + frontend build clean.
Related #437

Global handler now uses the management-service GetServerTools path (same
as the per-server endpoint) so a disabled/not-connected server yields an
empty tool set instead of a false partial:true/failed_servers flag.
Adjusted the unit-test controller to exercise the controller fallback
path. Adds the Playwright sweep (5/5 green), self-contained HTML report,
and screenshots under verification/.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 18, 2026

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4aae51d
Status: ✅  Deploy successful!
Preview URL: https://627a9b0c.mcpproxy-docs.pages.dev
Branch Preview URL: https://050-global-tools-page.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 50.32051% with 155 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/mcpproxy/tools_cmd.go 44.97% 96 Missing and 8 partials ⚠️
internal/cliclient/client.go 0.00% 27 Missing ⚠️
internal/httpapi/server.go 83.60% 6 Missing and 4 partials ⚠️
internal/storage/activity.go 72.41% 5 Missing and 3 partials ⚠️
internal/runtime/runtime.go 0.00% 4 Missing ⚠️
internal/server/server.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Related #437

Condense the spec 050 CLI note + auto-appended agent-context lines so
CLAUDE.md stays under the check-size 40,000-char gate. Full CLI
reference remains in docs/cli-management-commands.md.
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: 050-global-tools-page

Available Artifacts

  • archive-darwin-amd64 (26 MB)
  • archive-darwin-arm64 (23 MB)
  • archive-linux-amd64 (15 MB)
  • archive-linux-arm64 (13 MB)
  • archive-windows-amd64 (26 MB)
  • archive-windows-arm64 (23 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (20 MB)
  • installer-dmg-darwin-arm64 (18 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 26115347023 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

Algis Dumbris added 2 commits May 18, 2026 22:15
…link affordance

- Add Servers/Secrets count badges to sidebar WORKSPACE section for
  visual parity with the existing Tools badge. Server count is reactive
  via the status SSE; secret count fetched on mount.
- Secret badge uses total_secrets from /secrets/config (same source as
  the Secrets page) instead of /secrets/refs, which over-counts every
  config reference including ${env:...} placeholders.
- Tools summary cards (Total/Enabled/Disabled/Pending) are now clickable
  filter toggles with ring highlight, mirroring the Servers page.
- Tools table server name uses link-primary (always visible as a link)
  instead of link-hover, matching the modal's affordance.
@Dumbris Dumbris merged commit 538c1a9 into main May 19, 2026
63 of 71 checks passed
@Dumbris Dumbris deleted the 050-global-tools-page branch May 19, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants