[UI-REWRITE]: Add virtual server component tool testing - #90
Draft
gandhipratik203 wants to merge 1 commit into
Draft
[UI-REWRITE]: Add virtual server component tool testing#90gandhipratik203 wants to merge 1 commit into
gandhipratik203 wants to merge 1 commit into
Conversation
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
gandhipratik203
force-pushed
the
issue-6417-virtual-server-tool-try-it
branch
from
September 14, 2026 15:14
724ab19 to
c5de120
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs IBM/mcp-context-forge#6417
Design: IBM/mcp-context-forge#6710
Backend dependencies: IBM/mcp-context-forge#6416, IBM/mcp-context-forge#6743
Summary
server_idin scoped preview requests, live JSON-RPC calls, and generated snippets while preserving direct Tools behavior.associatedToolIdsdisplay-only so incomplete tool records cannot be invoked.Feature flag
VITE_ENABLE_VIRTUAL_SERVER_TOOL_TRY_IT=falseby default. When disabled, no component Test action or scoped tool invocation UI is exposed.Backend status
Live invocation uses qualified
tool.namewithparams.server_idand follows the existing/rpccancellation path. Backend hardening is tracked by IBM/mcp-context-forge#6416.Scoped preview sends
server_idto/v1/tools/preview/{name}. Backend support is tracked by IBM/mcp-context-forge#6743, so this PR remains draft and the feature remains off by default.Verification
npm test -- --reporter=dot(209 files, 3,432 passed, 1 skipped)npm run lintnpm run buildnpm run format:checknpm run e2e -- e2e/tools.spec.ts(38 passed)VITE_ENABLE_VIRTUAL_SERVER_TOOL_TRY_IT=true npm run e2e -- e2e/virtual-servers.spec.ts(44 passed)npm run e2e -- e2e/virtual-servers.spec.ts(41 passed, 3 flag-dependent tests skipped)HEADLESS=1 BASE_URL=http://localhost:5176 node virtual-server-try-it-manual.mjs(virtual server actions: ok)Manual verification
Mock-backed manual test
Setup
Save the script from the next collapsible as
virtual-server-try-it-manual.mjsat the repository root, then run:If Vite selects another port, pass it to Terminal B, for example
BASE_URL=http://localhost:5175 node virtual-server-try-it-manual.mjs.Steps
query=cloudflare,limit=5, and headerX-Tenant-Id=team-a. Click Preview and confirm Preview 200.server_id, the arguments, and forwarded header./api/rpcwithmethod=tools/call, qualifiedparams.name,params.server_id, arguments, and the forwarded header.PERMISSIONS=NO_EXECUTEandPERMISSIONS=NO_SERVERS_USE; Preview remains available while the Live switch is disabled with the relevant permission message.TOOLS=EMPTY; fallback component rows remain visible but do not expose Test.Ctrl-C both terminals to stop.
Mock script
Requires
@playwright/test, which is already a development dependency.