Skip to content

docs(webmcp): the ui_ prefix means browser-fulfilled, not "drives the UI" - #3640

Merged
chelojimenez merged 1 commit into
mainfrom
docs/ui-tool-namespace
Aug 3, 2026
Merged

docs(webmcp): the ui_ prefix means browser-fulfilled, not "drives the UI"#3640
chelojimenez merged 1 commit into
mainfrom
docs/ui-tool-namespace

Conversation

@chelojimenez

@chelojimenez chelojimenez commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #3635. Comments only — no executable line changes.

ui_ask_user collects input rather than driving a screen, which left three definitional docstrings inaccurate. Each defined the namespace by what the tools happened to do, rather than by what the prefix actually asserts.

The prefix asserts exactly one thing: the browser resolves the call. That's what the server's skip gate (isSkippableClientFulfilledToolCall) and pause predicate (hasUnresolvedClientFulfilledToolCalls) key on — a browser-fulfilled tool named anything else would either be executed server-side or leave the stream waiting on a result nobody sends.

Worth writing down because the narrowness is the point, and both wrong readings are inviting:

  • "it drives the UI" — no longer true of the whole set.
  • "it's a WebMCP tool" — never true. The catalog is WebMCP-shaped and is deliberately not exposed to browser-native agents (document.modelContext / navigator.modelContext). The shared shape buys familiarity and a clean annotations contract, nothing more.

Updated: shared/client-fulfilled-tools.ts, client/src/lib/webmcp/ui-tools-registry.ts, client/src/lib/webmcp/ui-tools-catalog.ts.

Deliberately not updated: the ~20 incidental "WebMCP UI tool" mentions elsewhere. They label the layer in passing rather than define it, and rewriting them all would be churn for no clarity gain.

Client typecheck clean; client/src/lib/webmcp + client/src/lib/__tests__ green (1,215 tests).

🤖 Generated with Claude Code


Note

Low Risk
Comments only; no logic, APIs, or server/client execution paths change.

Overview
Documentation-only — no runtime behavior changes. Three module-level comment blocks are rewritten so the ui_* namespace is defined by what the prefix asserts (the browser fulfills the tool call and supplies addToolOutput), not by what most tools happen to do.

The updated text spells out that ui_ask_user is the counterexample (collects input via an inline card, does not drive the inspector), and that the catalog is WebMCP-shaped for annotations/familiarity but is not registered on document.modelContext / navigator.modelContext. shared/client-fulfilled-tools.ts ties that narrow meaning to the server skip gate and stream pause predicate so readers do not mis-name browser-fulfilled tools.

Touched files: client-fulfilled-tools.ts, ui-tools-registry.ts, ui-tools-catalog.ts.

Reviewed by Cursor Bugbot for commit 7a9734d. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Clarifies that the ui_* prefix means the browser resolves the tool call, not that it drives the UI or is a WebMCP tool. Updates docstrings in shared/client-fulfilled-tools.ts, client/src/lib/webmcp/ui-tools-registry.ts, and client/src/lib/webmcp/ui-tools-catalog.ts; no executable changes.

Written for commit 7a9734d. Summary will update on new commits.

Review in cubic

… UI"

`ui_ask_user` (#3635) collects input rather than driving a screen, which made
three definitional docstrings inaccurate — each defined the namespace by what
the tools happened to do rather than by what the prefix asserts.

The prefix asserts exactly one thing: the BROWSER resolves the call. That is
what the server's skip gate and pause predicate key on, so a browser-fulfilled
tool named anything else would either get executed server-side or leave the
stream waiting for a result nobody sends. Worth stating, because the narrowness
is the point and both wrong readings are inviting:

  - "it drives the UI" — no longer true of the whole set,
  - "it's a WebMCP tool" — never true. The catalog is WebMCP-SHAPED and is
    deliberately not exposed to browser-native agents (`document.modelContext`
    / `navigator.modelContext`). The shared shape buys familiarity and a clean
    annotations contract, nothing else.

Comments only — no executable line changes. Left the incidental "WebMCP UI
tool" mentions elsewhere alone: they label the layer in passing rather than
define it, and rewriting ~20 of them would be churn.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Aug 3, 2026
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_bc653279-f601-442e-84eb-ca3c100c1512)

@dosubot

dosubot Bot commented Aug 3, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-09-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about inspector Add Dosu to your team

@chelojimenez

Copy link
Copy Markdown
Contributor Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updated documentation for the v1 ui_* namespace and its browser-fulfilled semantics. The catalog now documents the ui_ask_user exception and inspector-driving tools. The registry documentation describes inspector control, user-input handling, consumers, and membership-based dispatch. Shared documentation records WebMCP non-exposure and the namespace’s use in server skip and pause predicates.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

mcpjam-inspector/client/src/lib/webmcp/ui-tools-catalog.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: ESLint configuration in --config is invalid:

  • Unexpected top-level property "__esModule".

    at ConfigValidator.validateConfigSchema (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2177:19)
    at ConfigArrayFactory._normalizeConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3019:19)
    at ConfigArrayFactory._loadConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2984:21)
    at ConfigArrayFactory.loadFile (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2850:40)
    at createCLIConfigArray (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3660:35)
    at new CascadingConfigArrayFactory (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3735:29)
    at new CLIEngine (/soundcheck/node_modules/eslint/lib/cli-engine/cli-engine.js:617:36)
    at new ESLint (/soundcheck/node_modules/eslint/lib/eslint/eslint.js:430:27)
    at Object.execute (/soundcheck/node_modules/eslint/lib/cli.js:410:24)
    at async main (/soundcheck/node_modules/eslint/bin/eslint.js:152:22)

mcpjam-inspector/client/src/lib/webmcp/ui-tools-registry.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: ESLint configuration in --config is invalid:

  • Unexpected top-level property "__esModule".

    at ConfigValidator.validateConfigSchema (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2177:19)
    at ConfigArrayFactory._normalizeConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3019:19)
    at ConfigArrayFactory._loadConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2984:21)
    at ConfigArrayFactory.loadFile (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2850:40)
    at createCLIConfigArray (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3660:35)
    at new CascadingConfigArrayFactory (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3735:29)
    at new CLIEngine (/soundcheck/node_modules/eslint/lib/cli-engine/cli-engine.js:617:36)
    at new ESLint (/soundcheck/node_modules/eslint/lib/eslint/eslint.js:430:27)
    at Object.execute (/soundcheck/node_modules/eslint/lib/cli.js:410:24)
    at async main (/soundcheck/node_modules/eslint/bin/eslint.js:152:22)

mcpjam-inspector/shared/client-fulfilled-tools.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: ESLint configuration in --config is invalid:

  • Unexpected top-level property "__esModule".

    at ConfigValidator.validateConfigSchema (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2177:19)
    at ConfigArrayFactory._normalizeConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3019:19)
    at ConfigArrayFactory._loadConfigData (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2984:21)
    at ConfigArrayFactory.loadFile (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2850:40)
    at createCLIConfigArray (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3660:35)
    at new CascadingConfigArrayFactory (/soundcheck/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3735:29)
    at new CLIEngine (/soundcheck/node_modules/eslint/lib/cli-engine/cli-engine.js:617:36)
    at new ESLint (/soundcheck/node_modules/eslint/lib/eslint/eslint.js:430:27)
    at Object.execute (/soundcheck/node_modules/eslint/lib/cli.js:410:24)
    at async main (/soundcheck/node_modules/eslint/bin/eslint.js:152:22)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@mcpjam-inspector/shared/client-fulfilled-tools.ts`:
- Around line 18-22: Update the explanatory comment near
isClientFulfilledToolName to scope its claim specifically to ui_* tool names, or
explicitly mention both the ui_ prefix and isAppToolAlias(name) predicates; keep
the documented server skip-gate and pause-predicate behavior accurate without
changing the predicate implementation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a58c918d-a48b-4cdf-9858-0f8af492444d

📥 Commits

Reviewing files that changed from the base of the PR and between c9cdd31 and 7a9734d.

📒 Files selected for processing (3)
  • mcpjam-inspector/client/src/lib/webmcp/ui-tools-catalog.ts
  • mcpjam-inspector/client/src/lib/webmcp/ui-tools-registry.ts
  • mcpjam-inspector/shared/client-fulfilled-tools.ts

Comment on lines +18 to +22
* (`document.modelContext` / `navigator.modelContext`). The prefix is load
* bearing precisely because it is this narrow: it is the token the server's
* skip gate and pause predicate key on, so a browser-fulfilled tool named
* anything else would either be executed server-side or leave the stream
* waiting on a result nobody will send.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Scope the predicate claim to ui_* tools.

isClientFulfilledToolName also accepts isAppToolAlias(name) at Line 53. Therefore, the server does not recognize browser-fulfilled calls only through the ui_ prefix. As written, “a browser-fulfilled tool named anything else” is too broad and can mislead maintainers about the accepted client-fulfilled names.

Limit this explanation to ui_* tools, or document both naming predicates.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@mcpjam-inspector/shared/client-fulfilled-tools.ts` around lines 18 - 22,
Update the explanatory comment near isClientFulfilledToolName to scope its claim
specifically to ui_* tool names, or explicitly mention both the ui_ prefix and
isAppToolAlias(name) predicates; keep the documented server skip-gate and
pause-predicate behavior accurate without changing the predicate implementation.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Internal preview

Preview URL: https://mcp-inspector-pr-3640.up.railway.app
Deployed commit: 3a50236
PR head commit: 7a9734d
Backend target: staging fallback.
Health: ✅ Convex reachable
Access is employee-only in non-production environments.

@chelojimenez
chelojimenez merged commit bdbdfb5 into main Aug 3, 2026
14 checks passed
@chelojimenez
chelojimenez deleted the docs/ui-tool-namespace branch August 3, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant