browser_webmcp_refresh_tools
POST /api/execute/browser_webmcp_refresh_toolsForces a synchronous re-scan of the live DOM tree to discover newly mounted declarative `<form toolname>` WebMCP capabilities. Single-page applications frequently mutate views client-side via History API transitions, modal mountings, or asynchronous component hydration without triggering a full document load lifecycle event. When such dynamic updates inject new annotated forms or remove unmounted ones, calling this endpoint instructs the renderer's WebMCP observer to walk the current document tree and reconcile its internal capability table. Imperative handlers already registered through `navigator.modelContext.registerTool()` remain preserved alongside the newly indexed declarative forms without any duplication. The response returns the refreshed JSON array of available capability definitions, including each item's name, description, and input schema for immediate agent consumption and tool execution during autonomous browsing sessions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| context_id | string | yes | Browsing session identifier whose live DOM will be re-scanned for declarative WebMCP forms. |
Usage
result = await browser.webmcp_refresh_tools(context_id=context_id)