Test a Tool on Your Site
Run a tool in the real browser context, on your actual site, before enabling it for AI agents.
Why test on the real site
executeJs runs in the visitor's browser and can interact with the DOM. A sandbox won't have your site's elements. Testing on the real page gives you accurate results.
Opening the test panel
Hover any tool card in the dashboard. Click the flask icon (๐งช) to open the test panel.
If the tool has input parameters, you'll see a form to fill in test values.
Running the test
Fill in the arguments and click Open on site. This opens your site in a new tab with special query parameters:
https://yoursite.com?_aigentably_test=toolName&_aigentably_args=<base64>
The Aigentably snippet detects these parameters and runs the tool automatically.
Reading the result
A result overlay appears in the bottom-right corner of your site:
- Green (โ Result): the tool returned successfully
- Red (โ Error): the tool threw an error or returned
{ success: false }
The overlay shows the full return value as JSON and disappears after 15 seconds. Click ร to dismiss early.
Test from your coding agent
Test shows what a tool does on your page. To see your site the way an agent sees it, let your own coding agent (Claude Code, Cursor, Codex, or any MCP client) open the page and ask the browser which tools are registered. Chrome DevTools MCP can do that with its experimental WebMCP tools, list_webmcp_tools and execute_webmcp_tool. They read the browser's own registry, so they also see tools registered from JavaScript, which a static checker can't.
You need Chrome 150 or newer started with --enable-features=WebMCP. That turns on native WebMCP, and our snippet then registers your tools with the browser directly. Start that Chrome with remote debugging, in its own profile:
google-chrome --enable-features=WebMCP --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-webmcpThen add Chrome DevTools MCP to your agent, pointed at that browser and with the WebMCP tools switched on. The WebMCP tools are off by default:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--browser-url=http://127.0.0.1:9222",
"--categoryExperimentalWebmcp=true"
]
}
}
}Ask your agent something like:
Open https://your-site.com, list the WebMCP tools the page exposes, then call searchProducts with
{"query": "shoes"}and show me what it returned.
A healthy result lists the tools you expect for that page, with the names and descriptions from your dashboard, and the call returns the same JSON that Test shows. If the list is empty, see When Tools Don't Register. If a tool is missing only on some pages, check its path pattern.
The WebMCP category is experimental in Chrome DevTools MCP, so its flag or tool names may change. The tool reference has the current ones.
Common issues
"Tool not found on this page" The tool has a path pattern that doesn't match the current URL. Check your path pattern in the tool editor or try on a matching page.
Red overlay with DOM error
The executeJs code couldn't find an element. Check your selectors in the browser DevTools on the actual page first.
Test calls don't appear in analytics Test mode is intentionally excluded from analytics to keep your data clean.