Skip to content

feat(mcp): runtime tool-pack switching with tools/list_changed - #449

Merged
ecto merged 4 commits into
mainfrom
agent/issue-432
Jul 8, 2026
Merged

ecto merged 4 commits into
mainfrom
agent/issue-432

Conversation

@claude

@claude claude Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Closes #432

Lets agents enable/disable MCP tool packs at runtime instead of only via the boot-time VCAD_MCP_PACKS env var.

What

  • list_tool_packs — packs, per-pack enabled state, and tool count.
  • set_tool_packs — enable/disable by name (enable / disable arrays, or set = array / "all" / "none").
  • stdio/persistent: ListTools reflects the change immediately and notifications/tools/list_changed is emitted (now advertises tools.listChanged).
  • stateless HTTP: a signed-in user's choice is persisted keyed by user (mcp_tool_packs table; in-memory fake for local/anon) and re-derived on the next request. No push notification there — documented.

Compatibility

  • VCAD_MCP_PACKS still works and remains the boot-time default; default with nothing set is unchanged ("all packs").
  • Disabled-pack calls still return an actionable error, now naming set_tool_packs.

Tests / verification

  • New tool-packs-runtime.test.ts drives an InMemoryTransport pair (live switch + list_changed) and the stateless-HTTP persistence path via the in-memory store fake.
  • Regenerated tool-surface.fixture.json for the two new core tools.
  • npm test -w @vcad/mcp (672 pass) and npm run typecheck -w @vcad/mcp green.

🤖 Generated with Claude Code

Add list_tool_packs / set_tool_packs meta-tools so agents can enable or
disable domain tool packs mid-session instead of only via the boot-time
VCAD_MCP_PACKS env var.

- On stdio/persistent transports the change is live: ListTools reflects
  it immediately and notifications/tools/list_changed is emitted
  (tools.listChanged capability now advertised).
- On the stateless HTTP transport a signed-in user's choice is persisted
  keyed by user (mcp_tool_packs table / in-memory fake) and re-derived on
  the next request; anonymous callers fall back to VCAD_MCP_PACKS.
- VCAD_MCP_PACKS remains the boot-time default; default with nothing set
  is still "all packs". Disabled-pack calls still return an actionable
  error, now naming set_tool_packs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vcad-mcp Building Building Preview, Comment Jul 8, 2026 1:10am
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
mecheval Ignored Ignored Jul 8, 2026 1:10am
vcad Ignored Ignored Jul 8, 2026 1:10am
vcad-docs Ignored Ignored Jul 8, 2026 1:10am

Request Review

claude added 2 commits July 8, 2026 01:09
Supabase's schema_migrations keys on the numeric version prefix:
030 (live_broadcast_gate) and 031 (documents_realtime) landed on main
first, so the pack-preferences migration takes the next free slot.
Also absorbs #453, clearing the nightly clippy red on this branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5Jh8P571762nh3812kj76
@ecto
ecto merged commit 87874b4 into main Jul 8, 2026
13 checks passed
@chojiai

chojiai Bot commented Jul 8, 2026

Copy link
Copy Markdown

What shipped

Two new tools — list_tool_packs and set_tool_packs — let an agent enable or disable groups of domain tools during a session, without restarting or changing any configuration.

  • On a persistent connection (stdio), the change takes effect immediately: the tool list updates live and the client is notified to refresh.
  • On the web API, a signed-in user's choice is saved and applied automatically on their next request.
  • Trying to call a tool from a disabled group now returns a clear error message explaining exactly how to re-enable it.

Plain-English summary generated by Choji from this pull request.

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.

mcp: runtime tool-pack switching with tools/list_changed

2 participants