Repository navigation
Make the execution ladder legible from every rung - #201
Merged
Merged
Conversation
webmcp already tells a caller to fall back to execute_playwright_code or computer_action when a site offers no tools of its own. The other three say nothing about each other, so a model picking between them has to already know the order. manage_browsers now names the three ways to drive a session it creates. execute_playwright_code says when to prefer it over webmcp and when to drop to computer_action. computer_action says it is the last resort rather than describing itself as executing computer actions. Operational detail in all three is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
masnwilliams
approved these changes
Sep 22, 2026
masnwilliams
left a comment
Collaborator
There was a problem hiding this comment.
This makes the tool-choice order clearer without adding implementation complexity. No blocking code-quality concerns; 604 tests passed locally. Two non-blocking copy alignments below.
…tions # Conflicts: # src/lib/mcp/tools/browsers.ts # src/lib/mcp/tools/computer-action.ts # src/lib/mcp/tools/playwright.ts
The hint is a returned value, so a test can hold it to the order the tool descriptions state. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b3233ae. Configure here.
A missing string yields -1, which would have satisfied the order check on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

Second half of the metadata work. #198 covered the catalog entry and the server
instructions; this covers the tool descriptions, where the model actually chooses.The gap
Main has moved since this opened.
execute_playwright_codenow tells the caller to checkwebmcp.listTools()first and prefer a structured tool when the site exposes one, so the webmcp-to-playwright half is already there. Three things still are not:manage_browserscreates the session every web task runs in and never says how to drive it.computer_actionopened with "execute computer actions on a browser session", which tells a model nothing the tool name did not.browserSessionNextActions(), returned after create and update, namedcomputer_actionfirst. The most expensive rung, recommended as the immediate next step, contradicting the descriptions either side of it.The change
Three description openings and one returned hint. Operational detail untouched.
manage_browsers: names the four ways to drive a session once it exists, in preference order.computer_action: visual control for when the DOM cannot carry the step, and what to prefer above it.execute_playwright_code: addscomputer_actionbelow the existing WebMCP preference.browserSessionNextActions(): returns the same order instead ofcomputer_actionalone.The ladder gained a rung since this opened.
browser_replsits withexecute_playwright_codeas DOM interaction, so all four mentions name it, matching howwebmcpalready lists the fallbacks.What I did not touch
The other tools. Most open with "manage X" and describe the resource rather than the job, and several already carry a decent "when an agent needs Y" clause. Rewriting all of them is an unreviewable diff; these are the ones a model picks between during a web task.
No test pins the description prose. Asserting on it would need source matching or reaching into the SDK's private tool registry, both more brittle than what they would protect. The
next_actionshint is a returned value, so that one is pinned: a new test holds it to naming webmcp beforecomputer_action.Testing
bun test: 1050 pass, 0 fail.tsc --noEmitclean.🤖 Generated with Claude Code
Note
Low Risk
Metadata-only changes to tool descriptions and user-facing hints; no runtime behavior or API contract changes beyond guidance text.
Overview
Aligns MCP tool descriptions and post-create
next_actionsso models see the same browser-control preference everywhere: webmcp, then browser_repl / execute_playwright_code, then computer_action when the DOM cannot carry the step.manage_browsersnow states that sessions are the container for web work and names all four driving tools in order.computer_actionis reframed as coordinate/visual control and what to try first.execute_playwright_codeadds computer_action as the last rung below the existing WebMCP preference.browserSessionNextActions()returns that full ladder in the first hint instead of leading with computer_action alone.A new test asserts the create response’s first
next_actionsentry mentions webmcp before computer_action and includes the session id.Reviewed by Cursor Bugbot for commit b66f8a8. Bugbot is set up for automated code reviews on this repo. Configure here.