[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-browserbase-add-webmcp":3,"mdc-iu8up-key":34,"related-repo-browserbase-add-webmcp":1283,"related-org-browserbase-add-webmcp":1392},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"add-webmcp","implement WebMCP tools for web applications","Analyze an existing web application, identify safe user-visible capabilities across routes, forms, server actions, handlers, and schemas, then implement first-party WebMCP tools and validate discovery and invocation with Stagehand. Use when the user asks to make a codebase agent-ready, expose website features as WebMCP tools, or add WebMCP directly to an app rather than generating a standalone injection script from a URL.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"browserbase","Browserbase","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fbrowserbase.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"MCP","mcp","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Web Development","web-development",{"name":21,"slug":22,"type":15},"API Development","api-development",3649,"https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills","2026-09-04T08:01:04.681164","MIT",232,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"Browserbase's official collection of agent skills to access the web.","https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fadd-webmcp","---\nname: add-webmcp\ndescription: Analyze an existing web application, identify safe user-visible capabilities across routes, forms, server actions, handlers, and schemas, then implement first-party WebMCP tools and validate discovery and invocation with Stagehand. Use when the user asks to make a codebase agent-ready, expose website features as WebMCP tools, or add WebMCP directly to an app rather than generating a standalone injection script from a URL.\ncompatibility: \"Requires Node.js 22.18 or newer. Validation needs Chrome\u002FChromium locally or BROWSERBASE_API_KEY for a publicly reachable preview.\"\nlicense: MIT\nallowed-tools: Bash Read Grep Edit Write\n---\n\n# Add WebMCP\n\nTurn capabilities already implemented by a web app into maintained, first-party WebMCP tools. Modify the target codebase and its tests; do not introduce a hosted proxy or third-party runtime.\n\nCompatibility: the bundled Stagehand validator requires Node.js 22.18 or newer. Validation needs Chrome\u002FChromium locally or `BROWSERBASE_API_KEY` for a publicly reachable preview.\n\nBe verbose as you work: report what each step found as you go, not only in the final report.\n\nUse `webmcp-gen` instead when the requested output is a standalone init script derived from a live URL. This skill starts from source code and integrates tools into the application.\n\n## 1. Establish the application boundary\n\nRead the target repository's instructions, package manifests, framework configuration, and current git status. Preserve unrelated changes.\n\nSet `ADD_WEBMCP_SKILL_DIR` to the directory containing this file and run the bounded scanner:\n\n```bash\nnode \"$ADD_WEBMCP_SKILL_DIR\u002Fscripts\u002Fscan-codebase.mjs\" \"$TARGET_REPO\"\n```\n\nTreat scanner results as leads, not conclusions. In a monorepo, identify the actual browser app and the server packages it calls before editing.\n\n## 2. Build a capability inventory\n\nTrace each candidate from its user-visible entry point through the client handler, validation schema, server boundary, authorization checks, side effect, and returned state. Look at:\n\n- routes and screens;\n- forms and their submit handlers;\n- server actions, API handlers, RPC procedures, and service clients;\n- Zod, Valibot, Yup, Joi, JSON Schema, or equivalent validators;\n- authentication, authorization, CSRF, idempotency, rate limits, and audit hooks.\n\nPrefer complete user tasks such as `search_catalog` or `save_draft`, not a mechanical tool per endpoint. Exclude internal\u002Fadmin-only operations, authentication bypasses, raw database access, secret-bearing operations, and capabilities the UI does not grant the current user.\n\nFor each selected tool, record its source files, existing validation and authorization boundary, side effects, risk class, confirmation behavior, and a safe fixture input. Read [references\u002Fimplementation-and-validation.md](references\u002Fimplementation-and-validation.md) for the detailed inventory and framework patterns.\n\n## 3. Design the tool contract\n\n- Use a stable verb-noun name and describe the user-visible effect, prerequisites, and important exclusions.\n- Derive JSON Schema from the application's existing validator or domain type. Do not invent a second, looser contract. Close object schemas with `additionalProperties: false` and make the execute-time parser reject unknown fields too; a closed discovery schema backed by a permissive runtime parser is not a closed contract.\n- Return compact JSON-serializable domain results. Do not return DOM nodes, credentials, cookies, tokens, or entire HTML documents.\n- Call the same client\u002Fservice boundary as the UI so existing validation, authorization, observability, and business rules remain authoritative.\n- Validate again inside the handler. Agent-provided input is untrusted.\n- Never echo the request back as the result. Read the outcome from the application's own state, and where that state is updated asynchronously (React and most reactive stores do not reflect a change on the next line), poll until it settles before reading, then report whatever is actually true. Echoing turns a silent no-op into a passing test.\n\nAssign annotations deliberately:\n\n| Risk | Tool design | Annotation and confirmation behavior |\n| --- | --- | --- |\n| Read-only | No state mutation | Register `readOnlyHint: true`; add `untrustedContentHint: true` when output includes page or user-controlled text |\n| Reversible mutation | Drafts, preferences, cart edits | Register `readOnlyHint: false`; preserve auth\u002Fidempotency; test only with disposable state |\n| Consequential or irreversible | Purchase, send, publish, delete, permission changes | Split preview\u002Fprepare from commit where possible; do not add declarative `toolautosubmit`; keep the final action behind the app's real confirmation control |\n\nRegistration uses the current WebMCP hint names `readOnlyHint` and `untrustedContentHint`. Stagehand v4 normalizes discovered annotations to `readOnly`, `untrustedContent`, and, for declarative forms, `autosubmit`. These are hints to the browser or agent, not security enforcement. The application must enforce permissions, validation, confirmation, idempotency, and replay protection.\n\n## 4. Integrate with the application\n\nUse the runtime model context exposed by the browser:\n\n```js\nconst modelContext = navigator.modelContext || document.modelContext;\n```\n\nKeep both accessors: current Chrome exposes `document.modelContext` as a native `ModelContext` while `navigator.modelContext` is `undefined`, so the fallback is load-bearing rather than defensive. The surface is browser-provided and present on any page, so the application ships no polyfill.\n\nRegister imperative tools from a client-only root\u002Fprovider after the application is ready. `registerTool` returns a promise and is idempotent by name — re-registering replaces the previous definition rather than duplicating it, and there is no unregister handle — so remounting and hot reload are safe without teardown. Use declarative form attributes when an existing form already represents the exact task and preserving a visible review step is valuable.\n\nDo not duplicate server business logic in the tool executor. Do not weaken CSRF, same-origin, auth, or confirmation checks to make a smoke test pass. Never embed secrets in browser code.\n\n## 5. Verify the implementation\n\nRun the target's focused tests, typecheck, and production build. Then create a small `webmcp.e2e.json` with every expected tool. Discovery is mandatory; invocation is opt-in per test case and must use synthetic or disposable data.\n\nInstall the validator dependencies once:\n\n```bash\npnpm --dir \"$ADD_WEBMCP_SKILL_DIR\" install --frozen-lockfile\n```\n\nValidate localhost with a Stagehand-launched local browser:\n\n```bash\nnode \"$ADD_WEBMCP_SKILL_DIR\u002Fscripts\u002Fvalidate-stagehand.mjs\" \\\n  --url http:\u002F\u002Flocalhost:3000 \\\n  --config \"$TARGET_REPO\u002Fwebmcp.e2e.json\" \\\n  --local\n```\n\nLocal runs are headed by default so the browser is visible while it validates; pass `--headless` for CI or unattended runs.\n\nIf discovery reports zero tools, check the host before suspecting the code: dev servers commonly bind `localhost` only, so `--url http:\u002F\u002F127.0.0.1:PORT` finds nothing while `http:\u002F\u002Flocalhost:PORT` works. The failure looks identical to tools never registering.\n\nUse `--browserbase` only for a publicly reachable deployed preview. The validator uses Stagehand v4's real `page.tools()`, `tool.invoke()`, and `invocation.result()` path. It refuses consequential invocations unless `--allow-consequential` is explicitly supplied.\n\nAn injected init script is useful for testing the validator itself, but it is not proof that the target app ships its own tools. Final application proof must run without `--init-script`.\n\n## 6. Adversarially verify the tools actually worked\n\nStep 5 proves each tool is discoverable and that its executor ran. It does not prove the tool did what it claimed, and a passing config is not evidence of a sound contract. Run this step last, after step 5 is green, and drive it yourself against the live page rather than encoding it in `webmcp.e2e.json` — the point is to probe inputs the author did not anticipate.\n\nDrive the page with a persistent browser session so probes accumulate against real state. The browse CLI is the lightest option — one global install, and the session survives between commands:\n\n```bash\nbrowse open http:\u002F\u002Flocalhost:3000 --session probe --local --headed\nbrowse eval --session probe '(async()=>{const mc=document.modelContext;const t=(await mc.getTools()).find(x=>x.name===\"my_tool\");try{return \"ACCEPTED \"+JSON.stringify(await mc.executeTool(t,JSON.stringify({\u002F* probe input *\u002F})));}catch(e){return \"REJECTED\";}})()'\nbrowse screenshot --session probe --path \u002Ftmp\u002Feffect.png\n```\n\nThree things will cost time otherwise: `browse open` defaults to a **cloud** browser that cannot reach localhost, so `--local` is required; `browse eval` reliably accepts only single-line scripts, so run one probe per command; and `executeTool` takes the tool **object** plus arguments as a **JSON string** — a plain object fails with \"Failed to parse input arguments\".\n\nAssert on rejected-versus-accepted, not on error text. The WebMCP layer replaces a handler's message with a generic invocation-failed string, so a precise reason never reaches the caller.\n\nUse the discovered `tool.inputSchema` as the thing under test, not as the source of truth. For each tool, probe:\n\n- **Schema closure.** Invoke with an extra field the schema does not declare. A tool honoring §3 rejects it. Acceptance means the closed contract is decorative.\n- **Required fields.** Omit a `required` property. The invocation must fail; a `Completed` status carrying a null or partial result is worse than an error, because the agent believes it succeeded.\n- **Types and constraints.** Send a string where the schema says `number`, an out-of-range value against `minimum`\u002F`maximum`, and a value outside an `enum`. Silent coercion or echo-back means the handler never validated.\n- **Error honesty.** Confirm a tool that should fail reports a non-`Completed` status rather than returning a success-shaped body.\n- **Annotation honesty.** Compare each tool's real `annotations` against the risk you assigned in step 3. A pure lookup advertising `readOnly: false`, or a mutating tool advertising `readOnly: true`, is a defect even though discovery passes.\n- **Clean rejection.** After the malformed probes above, re-read the application's state. A rejected call must leave nothing behind; partial state from a half-applied invocation is a defect the accept\u002Freject result alone will not surface.\n- **Consequential gating.** Never invoke these. Verify the tool declares its risk, that no declarative `toolautosubmit` is present, and that the app's own confirmation control still stands between the agent and the effect.\n\nThen verify the **effect**, not the return value. Invoke the tool, then inspect the application independently — DOM assertions for rendered state, a screenshot when the surface is a canvas or chart. A handler that returns `{saved: true}` without changing anything passes step 5 and fails here. When the surface has no readable DOM, have the tool read back from the application's real store so the returned value is grounded in actual state rather than composed by the executor.\n\nTreat every discrepancy as a defect in the application or the tool contract, and fix it there. Do not loosen a schema, downgrade an annotation, or delete a probe to make this step pass.\n\n## 7. Report the result\n\nList the capabilities considered and explain exclusions. For each implemented tool, report its contract, backing code path, risk\u002Fconfirmation treatment, actual Stagehand discovery\u002Finvocation result, and the step 6 adversarial probes it survived. State any environment or browser support not tested.\n\nFor a comparative benchmark, quality audit, or scored evaluation, read [references\u002Fquality-rubric.md](references\u002Fquality-rubric.md). Apply its qualification gates before reporting numerical scores; do not let a high diagnostic score hide fabricated behavior, an unsafe consequence boundary, or missing production discovery.\n",{"data":35,"body":38},{"name":4,"description":6,"compatibility":36,"license":26,"allowed-tools":37},"Requires Node.js 22.18 or newer. Validation needs Chrome\u002FChromium locally or BROWSERBASE_API_KEY for a publicly reachable preview.","Bash Read Grep Edit Write",{"type":39,"children":40},"root",[41,49,55,69,74,87,94,99,112,172,177,183,188,218,239,252,258,299,304,422,467,473,478,545,582,595,600,606,619,624,666,671,764,777,806,849,861,867,879,884,993,1052,1057,1070,1229,1249,1254,1260,1265,1277],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","Add WebMCP",{"type":42,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"Turn capabilities already implemented by a web app into maintained, first-party WebMCP tools. Modify the target codebase and its tests; do not introduce a hosted proxy or third-party runtime.",{"type":42,"tag":50,"props":56,"children":57},{},[58,60,67],{"type":47,"value":59},"Compatibility: the bundled Stagehand validator requires Node.js 22.18 or newer. Validation needs Chrome\u002FChromium locally or ",{"type":42,"tag":61,"props":62,"children":64},"code",{"className":63},[],[65],{"type":47,"value":66},"BROWSERBASE_API_KEY",{"type":47,"value":68}," for a publicly reachable preview.",{"type":42,"tag":50,"props":70,"children":71},{},[72],{"type":47,"value":73},"Be verbose as you work: report what each step found as you go, not only in the final report.",{"type":42,"tag":50,"props":75,"children":76},{},[77,79,85],{"type":47,"value":78},"Use ",{"type":42,"tag":61,"props":80,"children":82},{"className":81},[],[83],{"type":47,"value":84},"webmcp-gen",{"type":47,"value":86}," instead when the requested output is a standalone init script derived from a live URL. This skill starts from source code and integrates tools into the application.",{"type":42,"tag":88,"props":89,"children":91},"h2",{"id":90},"_1-establish-the-application-boundary",[92],{"type":47,"value":93},"1. Establish the application boundary",{"type":42,"tag":50,"props":95,"children":96},{},[97],{"type":47,"value":98},"Read the target repository's instructions, package manifests, framework configuration, and current git status. Preserve unrelated changes.",{"type":42,"tag":50,"props":100,"children":101},{},[102,104,110],{"type":47,"value":103},"Set ",{"type":42,"tag":61,"props":105,"children":107},{"className":106},[],[108],{"type":47,"value":109},"ADD_WEBMCP_SKILL_DIR",{"type":47,"value":111}," to the directory containing this file and run the bounded scanner:",{"type":42,"tag":113,"props":114,"children":119},"pre",{"className":115,"code":116,"language":117,"meta":118,"style":118},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","node \"$ADD_WEBMCP_SKILL_DIR\u002Fscripts\u002Fscan-codebase.mjs\" \"$TARGET_REPO\"\n","bash","",[120],{"type":42,"tag":61,"props":121,"children":122},{"__ignoreMap":118},[123],{"type":42,"tag":124,"props":125,"children":128},"span",{"class":126,"line":127},"line",1,[129,135,141,147,153,158,162,167],{"type":42,"tag":124,"props":130,"children":132},{"style":131},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[133],{"type":47,"value":134},"node",{"type":42,"tag":124,"props":136,"children":138},{"style":137},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[139],{"type":47,"value":140}," \"",{"type":42,"tag":124,"props":142,"children":144},{"style":143},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[145],{"type":47,"value":146},"$ADD_WEBMCP_SKILL_DIR",{"type":42,"tag":124,"props":148,"children":150},{"style":149},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[151],{"type":47,"value":152},"\u002Fscripts\u002Fscan-codebase.mjs",{"type":42,"tag":124,"props":154,"children":155},{"style":137},[156],{"type":47,"value":157},"\"",{"type":42,"tag":124,"props":159,"children":160},{"style":137},[161],{"type":47,"value":140},{"type":42,"tag":124,"props":163,"children":164},{"style":143},[165],{"type":47,"value":166},"$TARGET_REPO",{"type":42,"tag":124,"props":168,"children":169},{"style":137},[170],{"type":47,"value":171},"\"\n",{"type":42,"tag":50,"props":173,"children":174},{},[175],{"type":47,"value":176},"Treat scanner results as leads, not conclusions. In a monorepo, identify the actual browser app and the server packages it calls before editing.",{"type":42,"tag":88,"props":178,"children":180},{"id":179},"_2-build-a-capability-inventory",[181],{"type":47,"value":182},"2. Build a capability inventory",{"type":42,"tag":50,"props":184,"children":185},{},[186],{"type":47,"value":187},"Trace each candidate from its user-visible entry point through the client handler, validation schema, server boundary, authorization checks, side effect, and returned state. Look at:",{"type":42,"tag":189,"props":190,"children":191},"ul",{},[192,198,203,208,213],{"type":42,"tag":193,"props":194,"children":195},"li",{},[196],{"type":47,"value":197},"routes and screens;",{"type":42,"tag":193,"props":199,"children":200},{},[201],{"type":47,"value":202},"forms and their submit handlers;",{"type":42,"tag":193,"props":204,"children":205},{},[206],{"type":47,"value":207},"server actions, API handlers, RPC procedures, and service clients;",{"type":42,"tag":193,"props":209,"children":210},{},[211],{"type":47,"value":212},"Zod, Valibot, Yup, Joi, JSON Schema, or equivalent validators;",{"type":42,"tag":193,"props":214,"children":215},{},[216],{"type":47,"value":217},"authentication, authorization, CSRF, idempotency, rate limits, and audit hooks.",{"type":42,"tag":50,"props":219,"children":220},{},[221,223,229,231,237],{"type":47,"value":222},"Prefer complete user tasks such as ",{"type":42,"tag":61,"props":224,"children":226},{"className":225},[],[227],{"type":47,"value":228},"search_catalog",{"type":47,"value":230}," or ",{"type":42,"tag":61,"props":232,"children":234},{"className":233},[],[235],{"type":47,"value":236},"save_draft",{"type":47,"value":238},", not a mechanical tool per endpoint. Exclude internal\u002Fadmin-only operations, authentication bypasses, raw database access, secret-bearing operations, and capabilities the UI does not grant the current user.",{"type":42,"tag":50,"props":240,"children":241},{},[242,244,250],{"type":47,"value":243},"For each selected tool, record its source files, existing validation and authorization boundary, side effects, risk class, confirmation behavior, and a safe fixture input. Read ",{"type":42,"tag":245,"props":246,"children":248},"a",{"href":247},"references\u002Fimplementation-and-validation.md",[249],{"type":47,"value":247},{"type":47,"value":251}," for the detailed inventory and framework patterns.",{"type":42,"tag":88,"props":253,"children":255},{"id":254},"_3-design-the-tool-contract",[256],{"type":47,"value":257},"3. Design the tool contract",{"type":42,"tag":189,"props":259,"children":260},{},[261,266,279,284,289,294],{"type":42,"tag":193,"props":262,"children":263},{},[264],{"type":47,"value":265},"Use a stable verb-noun name and describe the user-visible effect, prerequisites, and important exclusions.",{"type":42,"tag":193,"props":267,"children":268},{},[269,271,277],{"type":47,"value":270},"Derive JSON Schema from the application's existing validator or domain type. Do not invent a second, looser contract. Close object schemas with ",{"type":42,"tag":61,"props":272,"children":274},{"className":273},[],[275],{"type":47,"value":276},"additionalProperties: false",{"type":47,"value":278}," and make the execute-time parser reject unknown fields too; a closed discovery schema backed by a permissive runtime parser is not a closed contract.",{"type":42,"tag":193,"props":280,"children":281},{},[282],{"type":47,"value":283},"Return compact JSON-serializable domain results. Do not return DOM nodes, credentials, cookies, tokens, or entire HTML documents.",{"type":42,"tag":193,"props":285,"children":286},{},[287],{"type":47,"value":288},"Call the same client\u002Fservice boundary as the UI so existing validation, authorization, observability, and business rules remain authoritative.",{"type":42,"tag":193,"props":290,"children":291},{},[292],{"type":47,"value":293},"Validate again inside the handler. Agent-provided input is untrusted.",{"type":42,"tag":193,"props":295,"children":296},{},[297],{"type":47,"value":298},"Never echo the request back as the result. Read the outcome from the application's own state, and where that state is updated asynchronously (React and most reactive stores do not reflect a change on the next line), poll until it settles before reading, then report whatever is actually true. Echoing turns a silent no-op into a passing test.",{"type":42,"tag":50,"props":300,"children":301},{},[302],{"type":47,"value":303},"Assign annotations deliberately:",{"type":42,"tag":305,"props":306,"children":307},"table",{},[308,332],{"type":42,"tag":309,"props":310,"children":311},"thead",{},[312],{"type":42,"tag":313,"props":314,"children":315},"tr",{},[316,322,327],{"type":42,"tag":317,"props":318,"children":319},"th",{},[320],{"type":47,"value":321},"Risk",{"type":42,"tag":317,"props":323,"children":324},{},[325],{"type":47,"value":326},"Tool design",{"type":42,"tag":317,"props":328,"children":329},{},[330],{"type":47,"value":331},"Annotation and confirmation behavior",{"type":42,"tag":333,"props":334,"children":335},"tbody",{},[336,371,396],{"type":42,"tag":313,"props":337,"children":338},{},[339,345,350],{"type":42,"tag":340,"props":341,"children":342},"td",{},[343],{"type":47,"value":344},"Read-only",{"type":42,"tag":340,"props":346,"children":347},{},[348],{"type":47,"value":349},"No state mutation",{"type":42,"tag":340,"props":351,"children":352},{},[353,355,361,363,369],{"type":47,"value":354},"Register ",{"type":42,"tag":61,"props":356,"children":358},{"className":357},[],[359],{"type":47,"value":360},"readOnlyHint: true",{"type":47,"value":362},"; add ",{"type":42,"tag":61,"props":364,"children":366},{"className":365},[],[367],{"type":47,"value":368},"untrustedContentHint: true",{"type":47,"value":370}," when output includes page or user-controlled text",{"type":42,"tag":313,"props":372,"children":373},{},[374,379,384],{"type":42,"tag":340,"props":375,"children":376},{},[377],{"type":47,"value":378},"Reversible mutation",{"type":42,"tag":340,"props":380,"children":381},{},[382],{"type":47,"value":383},"Drafts, preferences, cart edits",{"type":42,"tag":340,"props":385,"children":386},{},[387,388,394],{"type":47,"value":354},{"type":42,"tag":61,"props":389,"children":391},{"className":390},[],[392],{"type":47,"value":393},"readOnlyHint: false",{"type":47,"value":395},"; preserve auth\u002Fidempotency; test only with disposable state",{"type":42,"tag":313,"props":397,"children":398},{},[399,404,409],{"type":42,"tag":340,"props":400,"children":401},{},[402],{"type":47,"value":403},"Consequential or irreversible",{"type":42,"tag":340,"props":405,"children":406},{},[407],{"type":47,"value":408},"Purchase, send, publish, delete, permission changes",{"type":42,"tag":340,"props":410,"children":411},{},[412,414,420],{"type":47,"value":413},"Split preview\u002Fprepare from commit where possible; do not add declarative ",{"type":42,"tag":61,"props":415,"children":417},{"className":416},[],[418],{"type":47,"value":419},"toolautosubmit",{"type":47,"value":421},"; keep the final action behind the app's real confirmation control",{"type":42,"tag":50,"props":423,"children":424},{},[425,427,433,435,441,443,449,451,457,459,465],{"type":47,"value":426},"Registration uses the current WebMCP hint names ",{"type":42,"tag":61,"props":428,"children":430},{"className":429},[],[431],{"type":47,"value":432},"readOnlyHint",{"type":47,"value":434}," and ",{"type":42,"tag":61,"props":436,"children":438},{"className":437},[],[439],{"type":47,"value":440},"untrustedContentHint",{"type":47,"value":442},". Stagehand v4 normalizes discovered annotations to ",{"type":42,"tag":61,"props":444,"children":446},{"className":445},[],[447],{"type":47,"value":448},"readOnly",{"type":47,"value":450},", ",{"type":42,"tag":61,"props":452,"children":454},{"className":453},[],[455],{"type":47,"value":456},"untrustedContent",{"type":47,"value":458},", and, for declarative forms, ",{"type":42,"tag":61,"props":460,"children":462},{"className":461},[],[463],{"type":47,"value":464},"autosubmit",{"type":47,"value":466},". These are hints to the browser or agent, not security enforcement. The application must enforce permissions, validation, confirmation, idempotency, and replay protection.",{"type":42,"tag":88,"props":468,"children":470},{"id":469},"_4-integrate-with-the-application",[471],{"type":47,"value":472},"4. Integrate with the application",{"type":42,"tag":50,"props":474,"children":475},{},[476],{"type":47,"value":477},"Use the runtime model context exposed by the browser:",{"type":42,"tag":113,"props":479,"children":483},{"className":480,"code":481,"language":482,"meta":118,"style":118},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const modelContext = navigator.modelContext || document.modelContext;\n","js",[484],{"type":42,"tag":61,"props":485,"children":486},{"__ignoreMap":118},[487],{"type":42,"tag":124,"props":488,"children":489},{"class":126,"line":127},[490,496,501,506,511,516,521,526,531,535,540],{"type":42,"tag":124,"props":491,"children":493},{"style":492},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[494],{"type":47,"value":495},"const",{"type":42,"tag":124,"props":497,"children":498},{"style":143},[499],{"type":47,"value":500}," modelContext ",{"type":42,"tag":124,"props":502,"children":503},{"style":137},[504],{"type":47,"value":505},"=",{"type":42,"tag":124,"props":507,"children":508},{"style":143},[509],{"type":47,"value":510}," navigator",{"type":42,"tag":124,"props":512,"children":513},{"style":137},[514],{"type":47,"value":515},".",{"type":42,"tag":124,"props":517,"children":518},{"style":143},[519],{"type":47,"value":520},"modelContext ",{"type":42,"tag":124,"props":522,"children":523},{"style":137},[524],{"type":47,"value":525},"||",{"type":42,"tag":124,"props":527,"children":528},{"style":143},[529],{"type":47,"value":530}," document",{"type":42,"tag":124,"props":532,"children":533},{"style":137},[534],{"type":47,"value":515},{"type":42,"tag":124,"props":536,"children":537},{"style":143},[538],{"type":47,"value":539},"modelContext",{"type":42,"tag":124,"props":541,"children":542},{"style":137},[543],{"type":47,"value":544},";\n",{"type":42,"tag":50,"props":546,"children":547},{},[548,550,556,558,564,566,572,574,580],{"type":47,"value":549},"Keep both accessors: current Chrome exposes ",{"type":42,"tag":61,"props":551,"children":553},{"className":552},[],[554],{"type":47,"value":555},"document.modelContext",{"type":47,"value":557}," as a native ",{"type":42,"tag":61,"props":559,"children":561},{"className":560},[],[562],{"type":47,"value":563},"ModelContext",{"type":47,"value":565}," while ",{"type":42,"tag":61,"props":567,"children":569},{"className":568},[],[570],{"type":47,"value":571},"navigator.modelContext",{"type":47,"value":573}," is ",{"type":42,"tag":61,"props":575,"children":577},{"className":576},[],[578],{"type":47,"value":579},"undefined",{"type":47,"value":581},", so the fallback is load-bearing rather than defensive. The surface is browser-provided and present on any page, so the application ships no polyfill.",{"type":42,"tag":50,"props":583,"children":584},{},[585,587,593],{"type":47,"value":586},"Register imperative tools from a client-only root\u002Fprovider after the application is ready. ",{"type":42,"tag":61,"props":588,"children":590},{"className":589},[],[591],{"type":47,"value":592},"registerTool",{"type":47,"value":594}," returns a promise and is idempotent by name — re-registering replaces the previous definition rather than duplicating it, and there is no unregister handle — so remounting and hot reload are safe without teardown. Use declarative form attributes when an existing form already represents the exact task and preserving a visible review step is valuable.",{"type":42,"tag":50,"props":596,"children":597},{},[598],{"type":47,"value":599},"Do not duplicate server business logic in the tool executor. Do not weaken CSRF, same-origin, auth, or confirmation checks to make a smoke test pass. Never embed secrets in browser code.",{"type":42,"tag":88,"props":601,"children":603},{"id":602},"_5-verify-the-implementation",[604],{"type":47,"value":605},"5. Verify the implementation",{"type":42,"tag":50,"props":607,"children":608},{},[609,611,617],{"type":47,"value":610},"Run the target's focused tests, typecheck, and production build. Then create a small ",{"type":42,"tag":61,"props":612,"children":614},{"className":613},[],[615],{"type":47,"value":616},"webmcp.e2e.json",{"type":47,"value":618}," with every expected tool. Discovery is mandatory; invocation is opt-in per test case and must use synthetic or disposable data.",{"type":42,"tag":50,"props":620,"children":621},{},[622],{"type":47,"value":623},"Install the validator dependencies once:",{"type":42,"tag":113,"props":625,"children":627},{"className":115,"code":626,"language":117,"meta":118,"style":118},"pnpm --dir \"$ADD_WEBMCP_SKILL_DIR\" install --frozen-lockfile\n",[628],{"type":42,"tag":61,"props":629,"children":630},{"__ignoreMap":118},[631],{"type":42,"tag":124,"props":632,"children":633},{"class":126,"line":127},[634,639,644,648,652,656,661],{"type":42,"tag":124,"props":635,"children":636},{"style":131},[637],{"type":47,"value":638},"pnpm",{"type":42,"tag":124,"props":640,"children":641},{"style":149},[642],{"type":47,"value":643}," --dir",{"type":42,"tag":124,"props":645,"children":646},{"style":137},[647],{"type":47,"value":140},{"type":42,"tag":124,"props":649,"children":650},{"style":143},[651],{"type":47,"value":146},{"type":42,"tag":124,"props":653,"children":654},{"style":137},[655],{"type":47,"value":157},{"type":42,"tag":124,"props":657,"children":658},{"style":149},[659],{"type":47,"value":660}," install",{"type":42,"tag":124,"props":662,"children":663},{"style":149},[664],{"type":47,"value":665}," --frozen-lockfile\n",{"type":42,"tag":50,"props":667,"children":668},{},[669],{"type":47,"value":670},"Validate localhost with a Stagehand-launched local browser:",{"type":42,"tag":113,"props":672,"children":674},{"className":115,"code":673,"language":117,"meta":118,"style":118},"node \"$ADD_WEBMCP_SKILL_DIR\u002Fscripts\u002Fvalidate-stagehand.mjs\" \\\n  --url http:\u002F\u002Flocalhost:3000 \\\n  --config \"$TARGET_REPO\u002Fwebmcp.e2e.json\" \\\n  --local\n",[675],{"type":42,"tag":61,"props":676,"children":677},{"__ignoreMap":118},[678,707,725,755],{"type":42,"tag":124,"props":679,"children":680},{"class":126,"line":127},[681,685,689,693,698,702],{"type":42,"tag":124,"props":682,"children":683},{"style":131},[684],{"type":47,"value":134},{"type":42,"tag":124,"props":686,"children":687},{"style":137},[688],{"type":47,"value":140},{"type":42,"tag":124,"props":690,"children":691},{"style":143},[692],{"type":47,"value":146},{"type":42,"tag":124,"props":694,"children":695},{"style":149},[696],{"type":47,"value":697},"\u002Fscripts\u002Fvalidate-stagehand.mjs",{"type":42,"tag":124,"props":699,"children":700},{"style":137},[701],{"type":47,"value":157},{"type":42,"tag":124,"props":703,"children":704},{"style":143},[705],{"type":47,"value":706}," \\\n",{"type":42,"tag":124,"props":708,"children":710},{"class":126,"line":709},2,[711,716,721],{"type":42,"tag":124,"props":712,"children":713},{"style":149},[714],{"type":47,"value":715},"  --url",{"type":42,"tag":124,"props":717,"children":718},{"style":149},[719],{"type":47,"value":720}," http:\u002F\u002Flocalhost:3000",{"type":42,"tag":124,"props":722,"children":723},{"style":143},[724],{"type":47,"value":706},{"type":42,"tag":124,"props":726,"children":728},{"class":126,"line":727},3,[729,734,738,742,747,751],{"type":42,"tag":124,"props":730,"children":731},{"style":149},[732],{"type":47,"value":733},"  --config",{"type":42,"tag":124,"props":735,"children":736},{"style":137},[737],{"type":47,"value":140},{"type":42,"tag":124,"props":739,"children":740},{"style":143},[741],{"type":47,"value":166},{"type":42,"tag":124,"props":743,"children":744},{"style":149},[745],{"type":47,"value":746},"\u002Fwebmcp.e2e.json",{"type":42,"tag":124,"props":748,"children":749},{"style":137},[750],{"type":47,"value":157},{"type":42,"tag":124,"props":752,"children":753},{"style":143},[754],{"type":47,"value":706},{"type":42,"tag":124,"props":756,"children":758},{"class":126,"line":757},4,[759],{"type":42,"tag":124,"props":760,"children":761},{"style":149},[762],{"type":47,"value":763},"  --local\n",{"type":42,"tag":50,"props":765,"children":766},{},[767,769,775],{"type":47,"value":768},"Local runs are headed by default so the browser is visible while it validates; pass ",{"type":42,"tag":61,"props":770,"children":772},{"className":771},[],[773],{"type":47,"value":774},"--headless",{"type":47,"value":776}," for CI or unattended runs.",{"type":42,"tag":50,"props":778,"children":779},{},[780,782,788,790,796,798,804],{"type":47,"value":781},"If discovery reports zero tools, check the host before suspecting the code: dev servers commonly bind ",{"type":42,"tag":61,"props":783,"children":785},{"className":784},[],[786],{"type":47,"value":787},"localhost",{"type":47,"value":789}," only, so ",{"type":42,"tag":61,"props":791,"children":793},{"className":792},[],[794],{"type":47,"value":795},"--url http:\u002F\u002F127.0.0.1:PORT",{"type":47,"value":797}," finds nothing while ",{"type":42,"tag":61,"props":799,"children":801},{"className":800},[],[802],{"type":47,"value":803},"http:\u002F\u002Flocalhost:PORT",{"type":47,"value":805}," works. The failure looks identical to tools never registering.",{"type":42,"tag":50,"props":807,"children":808},{},[809,810,816,818,824,825,831,833,839,841,847],{"type":47,"value":78},{"type":42,"tag":61,"props":811,"children":813},{"className":812},[],[814],{"type":47,"value":815},"--browserbase",{"type":47,"value":817}," only for a publicly reachable deployed preview. The validator uses Stagehand v4's real ",{"type":42,"tag":61,"props":819,"children":821},{"className":820},[],[822],{"type":47,"value":823},"page.tools()",{"type":47,"value":450},{"type":42,"tag":61,"props":826,"children":828},{"className":827},[],[829],{"type":47,"value":830},"tool.invoke()",{"type":47,"value":832},", and ",{"type":42,"tag":61,"props":834,"children":836},{"className":835},[],[837],{"type":47,"value":838},"invocation.result()",{"type":47,"value":840}," path. It refuses consequential invocations unless ",{"type":42,"tag":61,"props":842,"children":844},{"className":843},[],[845],{"type":47,"value":846},"--allow-consequential",{"type":47,"value":848}," is explicitly supplied.",{"type":42,"tag":50,"props":850,"children":851},{},[852,854,860],{"type":47,"value":853},"An injected init script is useful for testing the validator itself, but it is not proof that the target app ships its own tools. Final application proof must run without ",{"type":42,"tag":61,"props":855,"children":857},{"className":856},[],[858],{"type":47,"value":859},"--init-script",{"type":47,"value":515},{"type":42,"tag":88,"props":862,"children":864},{"id":863},"_6-adversarially-verify-the-tools-actually-worked",[865],{"type":47,"value":866},"6. Adversarially verify the tools actually worked",{"type":42,"tag":50,"props":868,"children":869},{},[870,872,877],{"type":47,"value":871},"Step 5 proves each tool is discoverable and that its executor ran. It does not prove the tool did what it claimed, and a passing config is not evidence of a sound contract. Run this step last, after step 5 is green, and drive it yourself against the live page rather than encoding it in ",{"type":42,"tag":61,"props":873,"children":875},{"className":874},[],[876],{"type":47,"value":616},{"type":47,"value":878}," — the point is to probe inputs the author did not anticipate.",{"type":42,"tag":50,"props":880,"children":881},{},[882],{"type":47,"value":883},"Drive the page with a persistent browser session so probes accumulate against real state. The browse CLI is the lightest option — one global install, and the session survives between commands:",{"type":42,"tag":113,"props":885,"children":887},{"className":115,"code":886,"language":117,"meta":118,"style":118},"browse open http:\u002F\u002Flocalhost:3000 --session probe --local --headed\nbrowse eval --session probe '(async()=>{const mc=document.modelContext;const t=(await mc.getTools()).find(x=>x.name===\"my_tool\");try{return \"ACCEPTED \"+JSON.stringify(await mc.executeTool(t,JSON.stringify({\u002F* probe input *\u002F})));}catch(e){return \"REJECTED\";}})()'\nbrowse screenshot --session probe --path \u002Ftmp\u002Feffect.png\n",[888],{"type":42,"tag":61,"props":889,"children":890},{"__ignoreMap":118},[891,928,963],{"type":42,"tag":124,"props":892,"children":893},{"class":126,"line":127},[894,899,904,908,913,918,923],{"type":42,"tag":124,"props":895,"children":896},{"style":131},[897],{"type":47,"value":898},"browse",{"type":42,"tag":124,"props":900,"children":901},{"style":149},[902],{"type":47,"value":903}," open",{"type":42,"tag":124,"props":905,"children":906},{"style":149},[907],{"type":47,"value":720},{"type":42,"tag":124,"props":909,"children":910},{"style":149},[911],{"type":47,"value":912}," --session",{"type":42,"tag":124,"props":914,"children":915},{"style":149},[916],{"type":47,"value":917}," probe",{"type":42,"tag":124,"props":919,"children":920},{"style":149},[921],{"type":47,"value":922}," --local",{"type":42,"tag":124,"props":924,"children":925},{"style":149},[926],{"type":47,"value":927}," --headed\n",{"type":42,"tag":124,"props":929,"children":930},{"class":126,"line":709},[931,935,940,944,948,953,958],{"type":42,"tag":124,"props":932,"children":933},{"style":131},[934],{"type":47,"value":898},{"type":42,"tag":124,"props":936,"children":937},{"style":149},[938],{"type":47,"value":939}," eval",{"type":42,"tag":124,"props":941,"children":942},{"style":149},[943],{"type":47,"value":912},{"type":42,"tag":124,"props":945,"children":946},{"style":149},[947],{"type":47,"value":917},{"type":42,"tag":124,"props":949,"children":950},{"style":137},[951],{"type":47,"value":952}," '",{"type":42,"tag":124,"props":954,"children":955},{"style":149},[956],{"type":47,"value":957},"(async()=>{const mc=document.modelContext;const t=(await mc.getTools()).find(x=>x.name===\"my_tool\");try{return \"ACCEPTED \"+JSON.stringify(await mc.executeTool(t,JSON.stringify({\u002F* probe input *\u002F})));}catch(e){return \"REJECTED\";}})()",{"type":42,"tag":124,"props":959,"children":960},{"style":137},[961],{"type":47,"value":962},"'\n",{"type":42,"tag":124,"props":964,"children":965},{"class":126,"line":727},[966,970,975,979,983,988],{"type":42,"tag":124,"props":967,"children":968},{"style":131},[969],{"type":47,"value":898},{"type":42,"tag":124,"props":971,"children":972},{"style":149},[973],{"type":47,"value":974}," screenshot",{"type":42,"tag":124,"props":976,"children":977},{"style":149},[978],{"type":47,"value":912},{"type":42,"tag":124,"props":980,"children":981},{"style":149},[982],{"type":47,"value":917},{"type":42,"tag":124,"props":984,"children":985},{"style":149},[986],{"type":47,"value":987}," --path",{"type":42,"tag":124,"props":989,"children":990},{"style":149},[991],{"type":47,"value":992}," \u002Ftmp\u002Feffect.png\n",{"type":42,"tag":50,"props":994,"children":995},{},[996,998,1004,1006,1012,1014,1020,1022,1028,1030,1036,1038,1043,1045,1050],{"type":47,"value":997},"Three things will cost time otherwise: ",{"type":42,"tag":61,"props":999,"children":1001},{"className":1000},[],[1002],{"type":47,"value":1003},"browse open",{"type":47,"value":1005}," defaults to a ",{"type":42,"tag":1007,"props":1008,"children":1009},"strong",{},[1010],{"type":47,"value":1011},"cloud",{"type":47,"value":1013}," browser that cannot reach localhost, so ",{"type":42,"tag":61,"props":1015,"children":1017},{"className":1016},[],[1018],{"type":47,"value":1019},"--local",{"type":47,"value":1021}," is required; ",{"type":42,"tag":61,"props":1023,"children":1025},{"className":1024},[],[1026],{"type":47,"value":1027},"browse eval",{"type":47,"value":1029}," reliably accepts only single-line scripts, so run one probe per command; and ",{"type":42,"tag":61,"props":1031,"children":1033},{"className":1032},[],[1034],{"type":47,"value":1035},"executeTool",{"type":47,"value":1037}," takes the tool ",{"type":42,"tag":1007,"props":1039,"children":1040},{},[1041],{"type":47,"value":1042},"object",{"type":47,"value":1044}," plus arguments as a ",{"type":42,"tag":1007,"props":1046,"children":1047},{},[1048],{"type":47,"value":1049},"JSON string",{"type":47,"value":1051}," — a plain object fails with \"Failed to parse input arguments\".",{"type":42,"tag":50,"props":1053,"children":1054},{},[1055],{"type":47,"value":1056},"Assert on rejected-versus-accepted, not on error text. The WebMCP layer replaces a handler's message with a generic invocation-failed string, so a precise reason never reaches the caller.",{"type":42,"tag":50,"props":1058,"children":1059},{},[1060,1062,1068],{"type":47,"value":1061},"Use the discovered ",{"type":42,"tag":61,"props":1063,"children":1065},{"className":1064},[],[1066],{"type":47,"value":1067},"tool.inputSchema",{"type":47,"value":1069}," as the thing under test, not as the source of truth. For each tool, probe:",{"type":42,"tag":189,"props":1071,"children":1072},{},[1073,1083,1109,1151,1168,1202,1212],{"type":42,"tag":193,"props":1074,"children":1075},{},[1076,1081],{"type":42,"tag":1007,"props":1077,"children":1078},{},[1079],{"type":47,"value":1080},"Schema closure.",{"type":47,"value":1082}," Invoke with an extra field the schema does not declare. A tool honoring §3 rejects it. Acceptance means the closed contract is decorative.",{"type":42,"tag":193,"props":1084,"children":1085},{},[1086,1091,1093,1099,1101,1107],{"type":42,"tag":1007,"props":1087,"children":1088},{},[1089],{"type":47,"value":1090},"Required fields.",{"type":47,"value":1092}," Omit a ",{"type":42,"tag":61,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":47,"value":1098},"required",{"type":47,"value":1100}," property. The invocation must fail; a ",{"type":42,"tag":61,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":47,"value":1106},"Completed",{"type":47,"value":1108}," status carrying a null or partial result is worse than an error, because the agent believes it succeeded.",{"type":42,"tag":193,"props":1110,"children":1111},{},[1112,1117,1119,1125,1127,1133,1135,1141,1143,1149],{"type":42,"tag":1007,"props":1113,"children":1114},{},[1115],{"type":47,"value":1116},"Types and constraints.",{"type":47,"value":1118}," Send a string where the schema says ",{"type":42,"tag":61,"props":1120,"children":1122},{"className":1121},[],[1123],{"type":47,"value":1124},"number",{"type":47,"value":1126},", an out-of-range value against ",{"type":42,"tag":61,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":47,"value":1132},"minimum",{"type":47,"value":1134},"\u002F",{"type":42,"tag":61,"props":1136,"children":1138},{"className":1137},[],[1139],{"type":47,"value":1140},"maximum",{"type":47,"value":1142},", and a value outside an ",{"type":42,"tag":61,"props":1144,"children":1146},{"className":1145},[],[1147],{"type":47,"value":1148},"enum",{"type":47,"value":1150},". Silent coercion or echo-back means the handler never validated.",{"type":42,"tag":193,"props":1152,"children":1153},{},[1154,1159,1161,1166],{"type":42,"tag":1007,"props":1155,"children":1156},{},[1157],{"type":47,"value":1158},"Error honesty.",{"type":47,"value":1160}," Confirm a tool that should fail reports a non-",{"type":42,"tag":61,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":47,"value":1106},{"type":47,"value":1167}," status rather than returning a success-shaped body.",{"type":42,"tag":193,"props":1169,"children":1170},{},[1171,1176,1178,1184,1186,1192,1194,1200],{"type":42,"tag":1007,"props":1172,"children":1173},{},[1174],{"type":47,"value":1175},"Annotation honesty.",{"type":47,"value":1177}," Compare each tool's real ",{"type":42,"tag":61,"props":1179,"children":1181},{"className":1180},[],[1182],{"type":47,"value":1183},"annotations",{"type":47,"value":1185}," against the risk you assigned in step 3. A pure lookup advertising ",{"type":42,"tag":61,"props":1187,"children":1189},{"className":1188},[],[1190],{"type":47,"value":1191},"readOnly: false",{"type":47,"value":1193},", or a mutating tool advertising ",{"type":42,"tag":61,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":47,"value":1199},"readOnly: true",{"type":47,"value":1201},", is a defect even though discovery passes.",{"type":42,"tag":193,"props":1203,"children":1204},{},[1205,1210],{"type":42,"tag":1007,"props":1206,"children":1207},{},[1208],{"type":47,"value":1209},"Clean rejection.",{"type":47,"value":1211}," After the malformed probes above, re-read the application's state. A rejected call must leave nothing behind; partial state from a half-applied invocation is a defect the accept\u002Freject result alone will not surface.",{"type":42,"tag":193,"props":1213,"children":1214},{},[1215,1220,1222,1227],{"type":42,"tag":1007,"props":1216,"children":1217},{},[1218],{"type":47,"value":1219},"Consequential gating.",{"type":47,"value":1221}," Never invoke these. Verify the tool declares its risk, that no declarative ",{"type":42,"tag":61,"props":1223,"children":1225},{"className":1224},[],[1226],{"type":47,"value":419},{"type":47,"value":1228}," is present, and that the app's own confirmation control still stands between the agent and the effect.",{"type":42,"tag":50,"props":1230,"children":1231},{},[1232,1234,1239,1241,1247],{"type":47,"value":1233},"Then verify the ",{"type":42,"tag":1007,"props":1235,"children":1236},{},[1237],{"type":47,"value":1238},"effect",{"type":47,"value":1240},", not the return value. Invoke the tool, then inspect the application independently — DOM assertions for rendered state, a screenshot when the surface is a canvas or chart. A handler that returns ",{"type":42,"tag":61,"props":1242,"children":1244},{"className":1243},[],[1245],{"type":47,"value":1246},"{saved: true}",{"type":47,"value":1248}," without changing anything passes step 5 and fails here. When the surface has no readable DOM, have the tool read back from the application's real store so the returned value is grounded in actual state rather than composed by the executor.",{"type":42,"tag":50,"props":1250,"children":1251},{},[1252],{"type":47,"value":1253},"Treat every discrepancy as a defect in the application or the tool contract, and fix it there. Do not loosen a schema, downgrade an annotation, or delete a probe to make this step pass.",{"type":42,"tag":88,"props":1255,"children":1257},{"id":1256},"_7-report-the-result",[1258],{"type":47,"value":1259},"7. Report the result",{"type":42,"tag":50,"props":1261,"children":1262},{},[1263],{"type":47,"value":1264},"List the capabilities considered and explain exclusions. For each implemented tool, report its contract, backing code path, risk\u002Fconfirmation treatment, actual Stagehand discovery\u002Finvocation result, and the step 6 adversarial probes it survived. State any environment or browser support not tested.",{"type":42,"tag":50,"props":1266,"children":1267},{},[1268,1270,1275],{"type":47,"value":1269},"For a comparative benchmark, quality audit, or scored evaluation, read ",{"type":42,"tag":245,"props":1271,"children":1273},{"href":1272},"references\u002Fquality-rubric.md",[1274],{"type":47,"value":1272},{"type":47,"value":1276},". Apply its qualification gates before reporting numerical scores; do not let a high diagnostic score hide fabricated behavior, an unsafe consequence boundary, or missing production discovery.",{"type":42,"tag":1278,"props":1279,"children":1280},"style",{},[1281],{"type":47,"value":1282},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1284,"total":1391},[1285,1292,1315,1330,1342,1358,1373],{"slug":4,"name":4,"fn":5,"description":6,"org":1286,"tags":1287,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1288,1289,1290,1291],{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"slug":1293,"name":1293,"fn":1294,"description":1295,"org":1296,"tags":1297,"stars":23,"repoUrl":24,"updatedAt":1314},"agent-experience","audit developer experience with AI agents","Audit the developer experience of a product, SDK, docs site, or SKILL.md by dropping multiple Claude subagents at it with only a tiny task prompt and real tools (WebFetch, Bash, Write). Agents must discover the docs themselves, install deps, ask for credentials if needed, and attempt real execution. The skill captures each agent's trace — tool calls, retries, wall time, errors — and scores on Setup Friction, Speed, Efficiency, Error Recovery, and Doc Quality, then emits an HTML report with an A–F grade and concrete fixes. Use when the user asks to audit agent experience, test a skill, audit docs for agents, check if a SDK is agent-friendly, validate a SKILL.md, measure agent DX, or benchmark how painful onboarding is for an AI agent. Triggers: 'audit agent experience', 'test this skill', 'audit docs for agents', 'is my SDK agent-friendly', 'run a DX audit', 'agent experience test', 'test my docs', 'how do agents do with my product'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1298,1301,1304,1305,1308,1311],{"name":1299,"slug":1300,"type":15},"Agents","agents",{"name":1302,"slug":1303,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},{"name":1306,"slug":1307,"type":15},"Engineering","engineering",{"name":1309,"slug":1310,"type":15},"Multi-Agent","multi-agent",{"name":1312,"slug":1313,"type":15},"QA","qa","2026-05-29T06:58:56.259807",{"slug":1316,"name":1316,"fn":1317,"description":1318,"org":1319,"tags":1320,"stars":23,"repoUrl":24,"updatedAt":1329},"autobrowse","run self-improving browser automation","Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1321,1322,1325,1328],{"name":1299,"slug":1300,"type":15},{"name":1323,"slug":1324,"type":15},"Automation","automation",{"name":1326,"slug":1327,"type":15},"Browser Automation","browser-automation",{"name":9,"slug":8,"type":15},"2026-04-23T05:00:30.528336",{"slug":1331,"name":1331,"fn":1332,"description":1333,"org":1334,"tags":1335,"stars":23,"repoUrl":24,"updatedAt":1341},"browser","automate browser interactions via CLI","Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Supports remote Browserbase sessions with Browserbase Identity, Verified browsers, automatic CAPTCHA solving, and residential proxies — ideal for protected websites and JavaScript-heavy pages.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1336,1337,1338],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1339,"slug":1340,"type":15},"CLI","cli","2026-04-06T18:06:22.005051",{"slug":1343,"name":1343,"fn":1344,"description":1345,"org":1346,"tags":1347,"stars":23,"repoUrl":24,"updatedAt":1357},"browser-to-api","generate OpenAPI specs from browser traffic","Turn a website's observable HTTP traffic into a best-effort OpenAPI 3.1 spec by analyzing a `browser-trace` capture. Use when the user wants to discover\u002Fextract API endpoints from a browser session, build an OpenAPI doc from network traffic, or document a third-party site's XHR\u002Ffetch surface for client integration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1348,1349,1350,1351,1354],{"name":21,"slug":22,"type":15},{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1352,"slug":1353,"type":15},"HTTP","http",{"name":1355,"slug":1356,"type":15},"OpenAPI","openapi","2026-05-14T06:07:27.298495",{"slug":1359,"name":1359,"fn":1360,"description":1361,"org":1362,"tags":1363,"stars":23,"repoUrl":24,"updatedAt":1372},"browser-trace","capture and debug browser automation traces","Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network\u002Fconsole\u002FDOM activity, attach a trace to an in-progress session, or feed structured per-page summaries back into an agent loop so its next iteration learns from the last one.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1364,1365,1366,1369],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1367,"slug":1368,"type":15},"Debugging","debugging",{"name":1370,"slug":1371,"type":15},"Observability","observability","2026-04-28T05:41:33.024656",{"slug":1374,"name":1374,"fn":1375,"description":1376,"org":1377,"tags":1378,"stars":23,"repoUrl":24,"updatedAt":1390},"browser-use-to-stagehand","migrate browser-use scripts to Stagehand","Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on Browserbase. Use when the user wants to convert, port, rewrite, or migrate a browser-use Agent script to Stagehand, map browser-use features\u002FAPIs to Stagehand primitives (act\u002Fextract\u002Fobserve\u002Fagent), or move agentic browser automation onto Browserbase with more determinism. Triggers on \"browser-use\", \"browser_use\", or \"Agent(task=...)\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1379,1380,1381,1384,1387],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1382,"slug":1383,"type":15},"Migration","migration",{"name":1385,"slug":1386,"type":15},"Python","python",{"name":1388,"slug":1389,"type":15},"TypeScript","typescript","2026-06-26T07:57:47.428249",18,{"items":1393,"total":1524},[1394,1413,1420,1429,1436,1442,1450,1457,1465,1485,1499,1511],{"slug":1395,"name":1395,"fn":1396,"description":1397,"org":1398,"tags":1399,"stars":1410,"repoUrl":1411,"updatedAt":1412},"stagehand-facade","automate web browsing and inspection","Browse, navigate, inspect, screenshot, and automate websites with the exact fx tools mcp_stagehand_run, mcp_stagehand_snapshot, and mcp_stagehand_screenshot.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1400,1401,1404,1407],{"name":1326,"slug":1327,"type":15},{"name":1402,"slug":1403,"type":15},"Screenshots","screenshots",{"name":1405,"slug":1406,"type":15},"Testing","testing",{"name":1408,"slug":1409,"type":15},"Web Scraping","web-scraping",23676,"https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fstagehand","2026-08-22T03:57:35.657778",{"slug":4,"name":4,"fn":5,"description":6,"org":1414,"tags":1415,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1416,1417,1418,1419],{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"slug":1293,"name":1293,"fn":1294,"description":1295,"org":1421,"tags":1422,"stars":23,"repoUrl":24,"updatedAt":1314},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1423,1424,1425,1426,1427,1428],{"name":1299,"slug":1300,"type":15},{"name":1302,"slug":1303,"type":15},{"name":9,"slug":8,"type":15},{"name":1306,"slug":1307,"type":15},{"name":1309,"slug":1310,"type":15},{"name":1312,"slug":1313,"type":15},{"slug":1316,"name":1316,"fn":1317,"description":1318,"org":1430,"tags":1431,"stars":23,"repoUrl":24,"updatedAt":1329},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1432,1433,1434,1435],{"name":1299,"slug":1300,"type":15},{"name":1323,"slug":1324,"type":15},{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"slug":1331,"name":1331,"fn":1332,"description":1333,"org":1437,"tags":1438,"stars":23,"repoUrl":24,"updatedAt":1341},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1439,1440,1441],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1339,"slug":1340,"type":15},{"slug":1343,"name":1343,"fn":1344,"description":1345,"org":1443,"tags":1444,"stars":23,"repoUrl":24,"updatedAt":1357},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1445,1446,1447,1448,1449],{"name":21,"slug":22,"type":15},{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1352,"slug":1353,"type":15},{"name":1355,"slug":1356,"type":15},{"slug":1359,"name":1359,"fn":1360,"description":1361,"org":1451,"tags":1452,"stars":23,"repoUrl":24,"updatedAt":1372},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1453,1454,1455,1456],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1367,"slug":1368,"type":15},{"name":1370,"slug":1371,"type":15},{"slug":1374,"name":1374,"fn":1375,"description":1376,"org":1458,"tags":1459,"stars":23,"repoUrl":24,"updatedAt":1390},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1460,1461,1462,1463,1464],{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},{"name":1382,"slug":1383,"type":15},{"name":1385,"slug":1386,"type":15},{"name":1388,"slug":1389,"type":15},{"slug":1466,"name":1466,"fn":1467,"description":1468,"org":1469,"tags":1470,"stars":23,"repoUrl":24,"updatedAt":1484},"company-research","conduct deep company and product research","Company discovery and deep research skill. Researches a company's product and ICP,\ndiscovers target companies to sell to using Browserbase Search API, deeply researches\neach using a Plan→Research→Synthesize pattern, and scores ICP fit — compiled into\na scored research report and CSV. Supports depth modes (quick\u002Fdeep\u002Fdeeper) for\nbalancing scale vs intelligence.\nUse when the user wants to: (1) find companies to sell to, (2) research potential\ncustomers, (3) discover companies matching an ICP, (4) build a target company list,\n(5) do market research on prospects. Triggers: \"find companies to sell to\",\n\"company research\", \"find prospects\", \"ICP research\", \"target companies\",\n\"who should we sell to\", \"market research\", \"lead research\", \"prospect list\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1471,1472,1475,1478,1481],{"name":9,"slug":8,"type":15},{"name":1473,"slug":1474,"type":15},"Competitive Intelligence","competitive-intelligence",{"name":1476,"slug":1477,"type":15},"Marketing","marketing",{"name":1479,"slug":1480,"type":15},"Research","research",{"name":1482,"slug":1483,"type":15},"Sales","sales","2026-04-27T05:34:56.172569",{"slug":1486,"name":1486,"fn":1487,"description":1488,"org":1489,"tags":1490,"stars":23,"repoUrl":24,"updatedAt":1498},"competitor-analysis","analyze competitors across features and pricing","Competitor research and intelligence skill. Takes a user's company (with optional\nseed competitor URLs), auto-discovers additional competitors via Browserbase Search API,\ndeeply researches each using a 4-lane pattern (marketing surface, external signal,\npublic benchmarks, strategic diff vs the user's company), and compiles the results\ninto an HTML report with four views: overview, per-competitor deep dive, side-by-side\nfeature\u002Fpricing matrix, and a chronological mentions feed (news, reviews,\nsocial, comparison pages, and public benchmarks).\nUse when the user wants to: (1) analyze competitors, (2) build a competitive matrix,\n(3) extract competitor pricing \u002F features, (4) find comparison pages and online\nmentions of competitors, (5) surface public benchmarks. Triggers: \"competitor analysis\",\n\"analyze competitors\", \"competitive intel\", \"competitor research\", \"competitor pricing\",\n\"feature comparison\", \"price comparison\", \"find comparisons\", \"who's comparing us\",\n\"competitor mentions\", \"competitor benchmarks\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1491,1492,1493,1494,1495],{"name":9,"slug":8,"type":15},{"name":1473,"slug":1474,"type":15},{"name":1476,"slug":1477,"type":15},{"name":1479,"slug":1480,"type":15},{"name":1496,"slug":1497,"type":15},"Strategy","strategy","2026-06-19T09:41:33.392499",{"slug":1500,"name":1500,"fn":1501,"description":1502,"org":1503,"tags":1504,"stars":23,"repoUrl":24,"updatedAt":1510},"cookie-sync","sync Chrome cookies to a Browserbase context","Sync cookies from local Chrome to a Browserbase persistent context so the browse CLI can access authenticated sites. Use when the user wants to browse as themselves, sync cookies, or log into sites via Browserbase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1505,1508,1509],{"name":1506,"slug":1507,"type":15},"Auth","auth",{"name":1326,"slug":1327,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:06:23.3251",{"slug":1512,"name":1512,"fn":1513,"description":1514,"org":1515,"tags":1516,"stars":23,"repoUrl":24,"updatedAt":1523},"event-prospecting","research event speakers for sales prospecting","Event prospecting skill. Takes a conference \u002F event speakers URL,\nextracts the people, filters their companies against the user's\nICP, then deep-researches only the speakers at ICP-fit companies.\nOutputs a person-first HTML report where each card answers \"why\nshould the AE talk to this person?\" with all public links and a\none-click DM opener.\nUse when the user wants to: (1) find leads at a specific\nconference, (2) prep for an event, (3) research event speakers,\n(4) build a target list from a sponsor\u002Fexhibitor page,\n(5) scrape conference speakers and rank by ICP fit.\nTriggers: \"find leads at {event}\", \"research speakers at\",\n\"prospect this conference\", \"stripe sessions leads\",\n\"ai engineer summit prospects\", \"event prospecting\",\n\"scrape conference speakers\", \"who should I meet at\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1517,1518,1521,1522],{"name":9,"slug":8,"type":15},{"name":1519,"slug":1520,"type":15},"Prospecting","prospecting",{"name":1479,"slug":1480,"type":15},{"name":1482,"slug":1483,"type":15},"2026-04-28T05:41:31.770467",19]