How to test WebMCP tools: a practical release checklist
A tool appearing in an inspector is the beginning of a test. The useful result is evidence that it works in the right page state, receives the right inputs, and leaves the user with the intended outcome.
This guide is for developers who already have a tool or a prototype to verify. It turns an inspector session into a repeatable release check. For the wider website audit, start with our AI-agent-ready website checklist.
1. Confirm browser support and inspect registered tools
WebMCP is evolving. The current draft specification places the API on document.modelContext and explicitly says it is not a W3C Standard. Older examples may use navigator.modelContext or a separate testing interface. Record your browser version and the implementation you actually use before copying an example.
For local development, Chrome documents enabling chrome://flags/#enable-webmcp-testing and relaunching the browser. Its overview also describes an origin trial starting with Chrome 149. Check the current instructions and trial availability for your build; a flag-enabled local session does not establish production availability. Source: Chrome’s WebMCP setup documentation.
- Open your test page in a compatible Chrome build.
- Open DevTools, choose Application, then WebMCP.
- Review Available Tools. Select a tool to inspect its inputs and run it manually.
- Use Invoked Tools to inspect the call status, parameters, and returned result.
These controls are documented in Chrome’s WebMCP debugging guide. If the pane is missing, verify your build and setup first. The Chrome Labs tools collection also links the Model Context Tool Inspector extension and evaluation utilities. Follow its linked installation instructions to identify the intended extension; several similarly named inspectors exist.
Save the discovered tool list after a direct page load, after relevant navigation, and after signing in with a test account if required. Repeat after leaving the feature. A tool that remains listed after its component disappears needs investigation. If no tools appear, inspect registration errors, the current frame, and the page state before changing the tool description.
Chrome also documents origin-isolation requirements and a tools permissions policy. When a tool works in a top-level page but disappears in an embedded context, inspect those restrictions. Do not broaden iframe permissions merely to clear a test failure; first establish which origin should expose which capability.
2. Define one testable tool contract
Choose a narrow task with an outcome you can verify independently. Our fictional equipment-rental site exposes find_available_equipment. A visitor can ask for available projectors at a pickup location for specific dates. The tool reads availability; reserving equipment is a separate action.
Write an answer sheet before testing. For this invented fixture, location berlin-mitte has projector proj-17 available from 20 to 21 September 2026. Location hamburg-altona has none. The fixture fixes dates and inventory so a changed answer has an explainable cause.
| Contract part | Expected behavior |
|---|---|
| Inputs | Equipment category, pickup location, start date, end date. |
| Valid result | Matching inventory IDs, availability dates, and location. |
| No availability | An explicit empty result for the requested location and dates. |
| Invalid range | A clear error when the end date precedes the start date. |
| Side effects | No reservation, payment, or outbound message. |
| Visible state | The results view reflects the same query and inventory. |
Include the date format and timezone semantics in your real contract. Date-only rental days and timestamp-based hourly bookings are different inputs. Decide where normalization happens and test the boundary rather than expecting the agent to infer it.
Chrome’s WebMCP best practices recommend clear tool purposes, meaningful parameter types, code-level validation, and registration that fits page state. Apply those principles to the contract: make it possible to tell a valid empty answer from a broken request.
3. Test execution without the model
Start with a known call in the inspector. Enter the fixture’s valid arguments, run the tool, and compare its output against the answer sheet. Check the visible results and the application’s underlying data as well. A green invocation status can coexist with the wrong location or stale inventory.
Then exercise the boundaries. The following is our proposed starting matrix, not a WebMCP conformance suite:
- Known match: return
proj-17for the fixture’s Berlin dates. - Known empty result: return no equipment for Hamburg, without silently switching cities.
- Missing required input: report which field is needed without making a reservation.
- Invalid date range: reject reversed dates; do not swap them without an explicit product rule.
- Dependency failure: simulate an unavailable inventory service and report the failure rather than reusing a stale success.
- Repeated call: return a consistent answer against the fixed fixture and preserve the no-write contract.
Automate the business logic checks in your existing test framework. Use a browser integration test for registration and visible state. Stub external services for controlled failure cases, and keep a separate integration check against your sandbox backend. A stub establishes expected handling; it does not establish that the live integration works.
Reset the fixture between cases. Otherwise, an earlier search selection, signed-in account, or changed inventory record may influence the next result. In the test record, distinguish a rejected invalid request from an infrastructure failure. They require different fixes and should not share one “tool failed” label.
4. Evaluate whether the agent chooses the right tool
Only after execution works should you investigate model behavior. Chrome’s WebMCP evaluation guide distinguishes deterministic tests from evaluations of tool choice, arguments, and complete journeys. It also recommends evaluating the tool set available in the relevant application state.
Give your agent normal requests, not instructions that name the correct function. Include the competing tools it would see in the real page. Testing only find_available_equipment cannot reveal confusion with a similarly described reservation tool.
This JSON is a framework-neutral test record you can adapt. Its keys are editorial labels, not the input format of Chrome’s evaluation CLI or the WebMCP API:
{
"case": "availability-without-reservation",
"prompt": "Find a projector in Berlin Mitte for September 20–21, 2026. I am only comparing options.",
"fixture": "rental-inventory-v1",
"expectedTool": "find_available_equipment",
"expectedArguments": {
"category": "projector",
"location": "berlin-mitte",
"startDate": "2026-09-20",
"endDate": "2026-09-21"
},
"expectedInventoryIds": ["proj-17"],
"expectedReservationCountChange": 0
}
Add variations that test a different decision, not just a different sentence:
- Direct request: the complete query above should retrieve the matching fixture.
- Missing location: “Find a projector for September 20–21, 2026” in a fresh session should seek the missing location unless your product defines a visible default.
- Unavailable request: the Hamburg query should report no matching inventory and may offer alternatives without claiming a match.
- Information only: “What is your cancellation policy?” should use the appropriate information source and leave inventory unchanged.
- Changed preference: after a Berlin search, ask for Hamburg and verify the new call does not carry over Berlin’s location.
Define acceptable outcomes before running the cases. A clarification can be correct. Multiple call sequences can also be valid when they produce the same authorized result. Compare meaningful arguments and facts rather than exact prose. Preserve the prompt, tool definitions, model identifier, settings, and trace so you can reproduce a regression.
Run repeated trials because model outputs can vary. Report the observed pass count and total for each case, with the tested configuration. Choose the number of repetitions according to risk and cost; this guide supplies no universal sample size or passing percentage. Keep a few unseen phrasings for retesting so description changes do not merely fit your first prompts.
5. Verify the result across the complete journey
A correct first call does not establish completion. For the rental fixture, test that the agent reads the returned availability, reports the right location and dates, and respects the request to compare options. Check that the reservation count is unchanged. The final answer should not say “reserved” when the tool only searched.
For a separate reservation journey, use an isolated sandbox and explicit test authorization. Define what the user reviews, what commits the reservation, and where the authoritative result is stored. Our WebMCP security checklist covers authorization, confirmation, and duplicate protection in detail.
Introduce a failure between steps: the equipment becomes unavailable after the search but before reservation. The correct outcome is a clear update and no false confirmation. Also test navigation away from the results page and a return through the browser’s back button. Capture whether the tool list and visible selection correspond to the current state.
If the journey ends in a conventional form, extend the test with our browser form-testing procedure. If the agent cannot read the offer before reaching the tool, investigate initial HTML and rendered content. Tool testing is one part of the customer journey.
Diagnose the first failing layer
| Observation | First investigation | Useful retest |
|---|---|---|
| No tool appears | Browser setup, frame policy, script errors, registration timing. | Load the exact route and inspect its current tools. |
| Manual invocation fails | Input handling, application logic, dependency response. | Replay the saved arguments against a known fixture. |
| Manual call works; agent picks another tool | Overlapping descriptions, available tools, missing context. | Repeat the same prompt with the full tool set. |
| Right tool, wrong location | Argument semantics, stale state, unclear defaults. | Compare predicted arguments with the contract. |
| Correct output, incorrect answer | Returned facts, qualifiers, and how the agent uses them. | Grade the answer against inventory and dates. |
| Success message, wrong stored result | Backend commit, stale UI, premature success reporting. | Verify the authoritative record and visible confirmation. |
Change one suspected cause at a time. Keep the failing trace and compare the same fixture before and after the repair. A description change is plausible when selection fails; it cannot repair an inventory service returning incorrect data.
Set release criteria and keep evidence
Use explicit gates for the journey you support. These are suggested engineering criteria, not a certification or a guarantee that every agent will succeed:
- Required tools are discoverable in each supported page and account state.
- Deterministic cases return the expected data and reject invalid requests correctly.
- Agent evaluations cover complete, ambiguous, irrelevant, and changed requests.
- Failures produce an accurate explanation and preserve the intended permission boundary.
- Visible state and stored results agree with the tool response.
- The normal human interface remains usable when WebMCP is unavailable.
- Known limitations, supported configurations, and a rollback owner are recorded.
Keep separate totals for execution tests, tool-selection evaluations, and end-to-end outcomes. Record skipped cases as untested. For consequential operations, an unauthorized write should block the release regardless of how many simple searches passed.
Rerun affected cases after changes to schemas, descriptions, routing, authentication, UI state, backend contracts, or the target browser and agent. After deployment, confirm registration through the real public hostname. Keep write tests on isolated sandbox data unless your production test procedure explicitly supports them.
Common questions
Does an inspector success mean the agent can use the tool?
It establishes that the tested invocation completed under that setup. Test agent choice, arguments, and the final outcome separately. Keep the actual output as evidence rather than relying on a status badge.
Can a public readiness scan validate WebMCP?
A passive scan can inspect public signals, but it cannot establish browser registration or runtime behavior without executing the page. An MCP server discovery check also measures a different interface. Read the scanner’s documented scope.
Do I need an AI model for every test?
No. Test fixed business rules and integrations with conventional automated checks. Use a model where you need evidence about interpreting a request, selecting a tool, or using its output. This keeps failures easier to diagnose.
Sources and methodology
Prepared by Adapt My Page with AI assistance using the primary documentation linked throughout, checked on 11 September 2026, and the project’s scanner documentation. The rental scenario, test record, debugging matrix, and release criteria are our proposed testing approach. They are not measured customer results or a published cross-agent benchmark.
Browser interfaces and draft APIs can change. We reviewed documentation for this article; we did not run a WebMCP interoperability experiment. For corrections, use the contact details in our legal notice.