Repository navigation
Shorten manage_browsers and manage_vault_wallets descriptions - #275
Closed
masnwilliams wants to merge 2 commits into
Closed
masnwilliams wants to merge 2 commits into
masnwilliams wants to merge 2 commits into
Conversation
Move save_profile result and retry semantics into its response note and error note, and wallet add/remove and token-refresh detail into the relevant parameter descriptions, keeping only what is needed to choose an action in each tool description.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
This branch was successfully deployed
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.
Stacked on #262 (base
mcp-coverage-update). It will be retargeted tomainonce #262 merges. No commits are pushed to the updater branch.Summary
The 0.148.0 coverage update grew two tool descriptions to several times their earlier size. This PR moves per-action detail to where the model reads it: parameter descriptions for anything needed before a call, and the response or error for anything needed after one. Each tool description keeps only what is needed to choose an action.
manage_browsersdescription (chars)manage_browsersfull tool entrymanage_vault_walletsdescription (chars)manage_vault_walletsfull tool entrytools/listpayload (all toolsets, vaults and search on)No other tool description changed.
manage_browserscreate_live_viewandsave_profile, says live-view URLs are bearer credentials that cannot be revoked before they expire, and sayssave_profilerestarts the browser and should be called at a stable point.save_profilesuccess responses now include anotewith post-save behaviour: reconnecting clients, what is omitted from the profile,timeout_secondsrestarting, how other browsers and pools pick up the snapshot, and how overlapping saves are ordered. This follows the existingcreate_live_viewnotepattern.save_profileis new in MCP: Update Node SDK to 0.148.0 #262, so no existing client depends on the old response shape.save_profileerrors append retry guidance:browser_busycan be retried;browser_lease_changedandbrowser_not_activecannot be retried against that browser; after a timeout, check the profile before calling again.profile_id/profile_namedescriptions say saving does not attach the profile or changesave_profile_changes.leased_atsentence (the field is returned as-is on browser records and is described onmanage_browser_poolsandmanage_apps), and "(optionally with start_replay)", which thestart_replayparameter already covers.manage_vault_walletstoken_refreshdetail was repeated in thespecdescription and in the wallet response guidance. It is removed from the tool description.specnow also saystoken_refreshis fixed at creation and that a failed AgentCard import creates nothing and can be retried.enrollmentandpayment_method_iddescriptions: single-use links, how long they last,purchase_unresolved, andremoval_pending. The post-call guidance frompaymentMethodOperationResponseand the KERNEL wallet guidance is unchanged.destructiveHintonmanage_vault_wallets: kept attrue#262 changed it from
falsetotrue. I kept it:destructiveHint: falsemeans "the tool performs only additive updates" (the default is true). Before MCP: Update Node SDK to 0.148.0 #262, the tool had onlycreate(create or retrieve by immutable key) andpayment_methods(a read), sofalsewas accurate. MCP: Update Node SDK to 0.148.0 #262 addedremove_payment_method, which removes a payment method, sofalsewould now be incorrect.manage_*tool setsdestructiveHint: true. The tools set tofalse(get_connection_context,search_docs,web_search, the auth login apps) never delete anything.createandpayment_methodscalls too. Avoiding that while staying accurate would mean movingadd_payment_method/remove_payment_methodinto their own tool. That is a separate design change and is not made here.Formatting
Ran prettier on the 8 files from #262 that failed
format:check. That is a separate commit with no content changes.Testing
bunx tsc --noEmit: passesbun test: all 1,285 tests pass. Thesave_profiletests now check the note in the success response and a new test checks the error guidance.prettier --check "src/**/*.ts": passesNote
Low Risk
Mostly MCP-facing documentation and response shape enrichment (
noteonsave_profile); no changes to core auth, payment execution, or browser control logic.Overview
Trims oversized
manage_browsersandmanage_vault_walletstool descriptions by keeping only action-selection context intools/list, and moving operational detail into parameter docs and call-time responses.For
save_profile, success payloads now include anote(browser restart, reconnect steps, omitted profile data, overlapping saves,timeout_seconds) matching the existing live-view pattern; failures appendsaveProfileErrorNoteretry guidance viathrowToolError.profile_id/profile_namedescriptions clarify that saving does not attach the profile or changesave_profile_changes. Tests assert the new note content and add abrowser_busyerror-case test.manage_vault_walletsshortens its top-level description and shifts Shop Pay / Linktoken_refreshand add/remove payment-method behavior intospec,enrollment, andpayment_method_idfield descriptions. Several test files receive Prettier-only formatting with no behavior change.Reviewed by Cursor Bugbot for commit 35ecb0b. Bugbot is set up for automated code reviews on this repo. Configure here.