Skip to content

fix(ui): explain unavailable MCP tool catalogs - #115994

Merged
steipete merged 2 commits into
mainfrom
steipete/tool-access-catalog-fix
Jul 29, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/tool-access-catalog-fix

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

Fixes an issue where users opening Control UI composer → Connectors → Tool access would see 0 of 0 tools on and “No tools available for this connector” even after the selected MCP connector had visibly run tools in the same session.

Why This Change Was Made

The effective-tools RPC already explains unavailable MCP catalogs with mcp-not-yet-connected, mcp-not-yet-listed, and mcp-stale-catalog notices. The connector view now presents that server-owned explanation whenever no matching MCP rows are available and omits the false zero-count summary. It preserves the generic no-tools fallback for responses without a discovery notice.

The live session uses the Codex app-server runtime, whose thread-owned MCP catalog is distinct from the core in-process SessionMcpRuntime consulted by tools.effective. Bridging those catalogs needs a separate harness/plugin inventory lifecycle design; this fix does not weaken MCP identity filtering or infer tool identity from transcript events.

User Impact

Operators now see why connector tools are not listable yet instead of being told that the connector has no tools.

Evidence

  • Live repro before: session transcript showed ctx7.resolve-library-id and ctx7.query-docs, while Tool access rendered 0 of 0 tools on and “No tools available for this connector.”
  • Live RPC before and after: tools.effective returned no source: "mcp" rows plus mcp-not-yet-connected for ctx7.
  • Live browser after rebuilding and restarting the isolated Gateway: Tool access rendered “MCP tools will appear here after an agent run discovers them,” with neither false empty-state string present.
  • Focused Control UI E2E: 9 passed in ui/src/e2e/chat-composer-capability-menu.e2e.test.ts.
  • pnpm ui:build passed, including precompressed-asset and Control UI performance checks.
  • Fresh Codex autoreview: clean, no accepted/actionable findings.
  • After rebasing onto current main, the composer E2E and the upstream-repaired Agents channel E2E passed together: 2 files, 10 tests.

Before

Tool access before: false empty state

After

Tool access after: MCP discovery notice

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 16:26
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 2:55 PM ET / 18:55 UTC.

ClawSweeper review

What this changes

The PR adds optional server names to MCP discovery notices from the effective-tools Gateway response, then uses those names in Control UI so an unavailable catalog explanation is shown only for its matching connector.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

The latest commit resolves the prior connector-attribution concern by carrying the affected MCP server names from the Gateway and rendering a discovery notice only when it names the selected connector. The patch is a focused, additive protocol-and-UI repair with supplied live browser proof; this PR should remain open for normal protected maintainer review rather than cleanup closure.

Priority: P3
Reviewed head: 51b7a8bfbc14b775bf3850f18abae21d1a0faf30

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fix with directly relevant live UI proof and regression coverage; the prior connector-scoping defect is addressed in the current head.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body includes a live before/after Control UI reproduction, Gateway response observation, screenshots showing the changed state, and focused E2E/build results; the provided review context also marks proof sufficient.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body includes a live before/after Control UI reproduction, Gateway response observation, screenshots showing the changed state, and focused E2E/build results; the provided review context also marks proof sufficient.
Evidence reviewed 5 items Prior finding addressed: The new branch commit adds optional servers to discovery notices and the UI now selects a notice only when its server list contains the connector being viewed, addressing the earlier cross-connector attribution concern.
Gateway contract carries attribution: The effective-tools notice producer sorts configured server names and returns them as servers alongside each MCP discovery message, while retaining the existing human-readable message.
Protocol compatibility coverage: The Gateway protocol schema makes servers optional and adds a schema test for server-scoped notices, so existing notice payloads remain valid while newer consumers can use attribution.
Findings None None.
Security None None.

How this fits together

The Gateway's effective-tools method reports the list of currently available tools plus notices explaining unavailable MCP catalogs. Control UI's composer reads that response while an operator drills into a connector, so the UI must preserve the server attribution of each notice before presenting it as a connector-specific explanation.

flowchart LR
  A[Configured MCP connectors] --> B[Gateway effective-tools inventory]
  B --> C[Server-scoped discovery notice]
  B --> D[Available MCP tool rows]
  C --> E[Control UI selected connector]
  D --> E
  E --> F[Tools list or accurate catalog status]
Loading

Before merge

  • Complete next step (P2) - No discrete repair remains; the PR carries the protected maintainer label and should proceed through normal human review and exact-head merge gating.
Agent review details

Security

None.

PR surface

Source +27, Tests +122, Other +4. Total +153 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 4 63 36 +27
Tests 3 125 3 +122
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 1 +4
Total 8 193 40 +153

Review metrics

Metric Value Why it matters
Protocol notice surface 1 optional response field added The additive servers field preserves older notice payloads while allowing the UI to avoid attributing a session-wide notice to the wrong connector.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/src/e2e/chat-composer-capability-menu.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the optional, server-scoped notice contract and its connector filter as the canonical path, then land after the protected maintainer review confirms the exact head and normal required checks.

Do we have a high-confidence way to reproduce the issue?

Yes from the supplied live reproduction and focused E2E path: configure at least two MCP connectors, return a discovery notice for only one, then open Tool access for each connector. The PR body also records the original false empty state with a live browser result.

Is this the best way to solve the issue?

Yes. Preserving server identity at the Gateway notice boundary and filtering on the selected connector is narrower and safer than inferring MCP ownership from transcript activity or weakening the existing identity filter.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 83aca8a59c7c.

Labels

Label justifications:

  • P3: This is a bounded Control UI correctness and clarity repair without evidence of message loss, session corruption, security impact, or core-runtime unavailability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes a live before/after Control UI reproduction, Gateway response observation, screenshots showing the changed state, and focused E2E/build results; the provided review context also marks proof sufficient.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes a live before/after Control UI reproduction, Gateway response observation, screenshots showing the changed state, and focused E2E/build results; the provided review context also marks proof sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes a live before/after Control UI reproduction, Gateway response observation, screenshots showing the changed state, and focused E2E/build results; the provided review context also marks proof sufficient.

Evidence

What I checked:

Likely related people:

  • steipete: Authored both commits that introduce server-scoped notice data and the matching UI behavior, and is assigned on this PR; no separate current-main ownership trail was available in the read-only review environment. (role: current implementation author and assigned reviewer; confidence: medium; commits: d32a11085fd8, 51b7a8bfbc14; files: src/gateway/server-methods/tools-effective.ts, ui/src/pages/chat/components/chat-composer-plus-menu.ts, packages/gateway-protocol/src/schema/agents-models-skills.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-07-29T16:31:24.570Z sha 60386424c0f5aa8705c86746123c300af81bbcc9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-29T17:02:19.613Z sha 30b53efa706f1ca97595d9ff04bf2061870324f8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-29T17:19:15.131Z sha d32a110 :: found issues before merge. :: [P2] Scope the discovery notice to the selected connector

@steipete
steipete force-pushed the steipete/tool-access-catalog-fix branch from 5603c20 to 30b53ef Compare July 29, 2026 16:57
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 29, 2026
@steipete
steipete force-pushed the steipete/tool-access-catalog-fix branch from 30b53ef to d32a110 Compare July 29, 2026 17:14
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 29, 2026
@steipete steipete self-assigned this Jul 29, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: M and removed size: S labels Jul 29, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 29, 2026
@steipete
steipete merged commit e0ab154 into main Jul 29, 2026
132 of 142 checks passed
@steipete
steipete deleted the steipete/tool-access-catalog-fix branch July 29, 2026 19:12
vincentkoc added a commit to sunlit-deng/openclaw that referenced this pull request Jul 29, 2026
* origin/main:
  fix(ui): explain unavailable MCP tool catalogs (openclaw#115994)
  fix(skills): run experience review outside released request roots (openclaw#116040)
  docs(security): add safe Gmail reader setup (openclaw#116041)
  chore: refresh browser gateway runtime (openclaw#116043)
  test: isolate gateway sequence lifecycle coverage
  docs: note gateway reconnect sequence fix
  test: cover gateway sequence reset on restart
  test: cover gateway sequence reset on reconnect
  fix: reset gateway event sequence on reconnect
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to masatohoshino/openclaw that referenced this pull request Jul 29, 2026
* origin/main: (151 commits)
  feat(plugins): allow per-turn tool narrowing in prompt hooks (openclaw#114151)
  docs(hooks): mark pairing hook observation-only (openclaw#116055)
  docs(control-ui): document composer capability menu (openclaw#115858)
  fix(build): bound declaration memory use (openclaw#116021)
  fix: Slack replies recover after gateway startup replay (openclaw#115991)
  fix(azure-speech): keep valid voices from malformed catalogs (openclaw#115067)
  fix(agents): prevent model runtime startup timeout (openclaw#116039)
  fix(ui): explain unavailable MCP tool catalogs (openclaw#115994)
  fix(skills): run experience review outside released request roots (openclaw#116040)
  docs(security): add safe Gmail reader setup (openclaw#116041)
  chore: refresh browser gateway runtime (openclaw#116043)
  test: isolate gateway sequence lifecycle coverage
  docs: note gateway reconnect sequence fix
  test: cover gateway sequence reset on restart
  test: cover gateway sequence reset on reconnect
  fix: reset gateway event sequence on reconnect
  fix(codex): avoid transcript mirror snapshot churn (openclaw#115070)
  fix(test): stop cross-file state leaks in media suites (openclaw#116027)
  feat(hooks): add persistent hook session mode (openclaw#75918)
  fix(memory): return early for blank searches (openclaw#116034)
  ...
vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main: (39 commits)
  feat(apple): media renditions, Now Playing, video upload (#116051)
  feat(android): media renditions, MediaSession, video upload (#116037)
  feat(cli): run agent exec against the ambient config, composed in memory (#116038)
  fix #95351: [Feature]: Generic JSONL line-parsing hook for CliBackendPlugin (native tool-card support beyond claude-stream-json) (#95386)
  feat(plugins): allow per-turn tool narrowing in prompt hooks (#114151)
  docs(hooks): mark pairing hook observation-only (#116055)
  docs(control-ui): document composer capability menu (#115858)
  fix(build): bound declaration memory use (#116021)
  fix: Slack replies recover after gateway startup replay (#115991)
  fix(azure-speech): keep valid voices from malformed catalogs (#115067)
  fix(agents): prevent model runtime startup timeout (#116039)
  fix(ui): explain unavailable MCP tool catalogs (#115994)
  fix(skills): run experience review outside released request roots (#116040)
  docs(security): add safe Gmail reader setup (#116041)
  chore: refresh browser gateway runtime (#116043)
  test: isolate gateway sequence lifecycle coverage
  docs: note gateway reconnect sequence fix
  test: cover gateway sequence reset on restart
  test: cover gateway sequence reset on reconnect
  fix: reset gateway event sequence on reconnect
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
* fix(ui): explain undiscovered MCP tools

* fix(ui): scope MCP discovery notices to the viewed connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant