browser_webmcp_call_tool
Browser Webmcp Call Tool
Execute a WebMCP tool that was declared by the page. The tool's execute callback runs in the page's JavaScript context. For declarative form tools, this fills form fields with the input values and submits. Returns the tool's result as JSON. Timeout: 30 seconds.
Usage Example
123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.webmcp_call_tool(
context_id=context_id,
tool_name="value"
)
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
tool_namestringrequiredThe name of the WebMCP tool to execute (as registered by the page via navigator.modelContext.registerTool)
Optional
inputstringJSON object containing input parameters for the tool, matching the tool's inputSchema
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}