# WebMCP in Practice — Test Agent Outcomes, Not Just Tool Calls > Use DevDesk’s duplicate release-notes tasks to test the board outcome, then use Chrome’s WebMCP Evals CLI to check model tool calls and simulate outcomes on the live board. - **Author**: Luca Del Puppo (@puppo92) — AI Native Engineer at Nearform - **Published**: Nov 26, 2026 - **Canonical URL**: https://blog.delpuppo.net/webmcp-in-practice/webmcp-agent-evaluations/ - **Series**: WebMCP in Practice (Part 5 of 5) — https://delpuppo.net/blog/series/webmcp-in-practice/ - **Series LLMs.txt**: https://delpuppo.net/blog/series/webmcp-in-practice/llms.txt - **Category**: Web Development - **Tags**: webmcp, ai, typescript - **Blog Index LLMs.txt**: https://delpuppo.net/blog/llms.txt ## Series Context: WebMCP in Practice - Part 1: [WebMCP in Practice — Give AI Agents a Clear Way into Your App](https://delpuppo.net/blog/webmcp-in-practice/webmcp-in-practice-introduction/) - Part 2: [WebMCP in Practice — Turn an HTML Form into an Agent Tool](https://delpuppo.net/blog/webmcp-in-practice/webmcp-declarative-forms/) - Part 3: [WebMCP in Practice — Find the Right Task and Update It](https://delpuppo.net/blog/webmcp-in-practice/webmcp-imperative-tools/) - Part 4: [WebMCP in Practice — Keep Tools Honest When State Changes](https://delpuppo.net/blog/webmcp-in-practice/webmcp-state-errors-user-control/) - Part 5: [WebMCP in Practice — Test Agent Outcomes, Not Just Tool Calls](https://delpuppo.net/blog/webmcp-in-practice/webmcp-agent-evaluations/) **(Current Article)** --- Imagine an agent calls `list_tasks`, then `set_task_status`, and tells you the Design System release notes are done. Open DevDesk and there it is, the wrong card in **Done**. Both tool names look right in the trace. The arguments and the board tell a different story. In Part 04, we made the tools report what happened when a task moved, an ID went stale, or a save failed. Now we can turn those outcomes into checks. We’ll start with the application behavior we can run locally, then use Chrome’s WebMCP Evals CLI to check the model’s calls and write a simulation that inspects the live board. [Part 04 — Keep Tools Honest When State Changes](https://blog.delpuppo.net/webmcp-in-practice/webmcp-state-errors-user-control/) ![DD-101 in Done while the Design System task DD-104 is still In progress](/images/webmcp-in-practice/05-wrong-card.webp) *An intentionally reproduced failure state. The DevDesk card moved while the Design System card stayed put.* ## Run the application checks With Node.js 26 or later, check out the branch for this chapter. The smoke test invokes the application’s imperative handlers in memory. You can run it without starting Vite, connecting a browser, or configuring a model. [Part 05 demo](https://github.com/Puppo/webmcp-in-practice/tree/part-05-agent-evaluations) ```sh git clone https://github.com/Puppo/webmcp-in-practice.git cd webmcp-in-practice git checkout part-05-agent-evaluations npm ci npm run eval:smoke npm test ``` Use `npm run dev` if you also want to open the board and try the examples by hand. The full suite runs the smoke cases alongside the task, storage, and registration tests. It also checks that `evals/schema.json` matches the imperative registrations and the schema we expect Chrome to generate from the declarative form. [Schema drift test](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/src/schema.test.ts) ## Check what actually changed The test starts from fresh fixtures and copies the board before invoking the tools. It captures each definition using a mock `registerTool`, then calls the real `execute` handlers with arguments supplied by the test. The storage outcome is supplied by the in-memory adapter. Here’s the case for the duplicate title. [Smoke test source](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/src/eval-smoke.test.ts) ```typescript const board = freshBoard() const before = structuredClone(board.tasks) const matches = await board.call('list_tasks', { project: 'Design System', query: 'release notes', }) expect(matches.map((task: Task) => task.id)).toEqual(['DD-104']) expect( await board.call('set_task_status', { taskId: matches[0].id, status: 'done', }), ).toMatchObject({ changed: true, persisted: true, }) expect( board.tasks .filter( (task, index) => JSON.stringify(task) !== JSON.stringify(before[index]), ) .map(task => task.id), ).toEqual(['DD-104']) expect( await board.call('set_task_status', { taskId: 'DD-104', status: 'done', }), ).toMatchObject({ changed: false, }) ``` The board comparison catches an update to `DD-101` even if the tool response looks successful. This test compares fixture rows by position, which works for an operation that preserves order. For a wider workflow that can insert, remove, or reorder tasks, compare snapshots by ID and check the expected fields. Five smoke tests check board outcomes. They cover the qualified update and its repeat, the two results from an ambiguous lookup, the missing ID, instruction-like text returned as task data, and an update when persistence reports failure. The ambiguous lookup test proves that listing leaves the board alone. Whether an agent asks which project the user meant is a separate behavior to evaluate. ## Run the local model evaluation The demo pins `webmcp-evals` 0.1.0. From the same checkout, copy the example environment file and set `GOOGLE_AI` in `.env` to your Gemini API key. Then run the evaluation. This uses the default `vercel` backend and `gemini-3.5-flash` model. It makes model requests that can incur charges. [Demo evaluation setup](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md) ```sh cp .env.example .env # Set GOOGLE_AI in .env before running the command. npm run eval:local ``` The script runs `webmcp-evals local -t evals/schema.json -e evals/evals.json`. The 13 cases send user messages and static tool definitions to the model. The CLI compares the calls it gets back with `expectedCall`. Reports go into `.evals/`. To repeat each case three times, pass `-r 3` after `--`. [Chrome’s WebMCP evaluation guide](https://developer.chrome.com/docs/ai/webmcp/evals) · [WebMCP Evals CLI](https://github.com/GoogleChromeLabs/webmcp-tools/tree/main/webmcp-evals) ```sh npm run eval:local -- -r 3 ``` ### Follow the calls from lookup to update Take “I just finished writing the Design System release notes.” The `ordered` group expects a call to `list_tasks` with a release-notes query, followed by `set_task_status` with `taskId: "DD-104"` and `status: "done"`. The lookup mock returns both release-notes tasks, so the model can use the project in each result to pick the right ID. An extra `project` argument is allowed because the CLI matches arguments as a subset. [Model cases](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/evals.json) Local mode returns each `mockOutput` by tool name. With that setup, the model can get a useful result even when it sends the wrong arguments. The CLI checks those arguments separately. DevDesk’s smoke suite replays the imperative mocks against the real handlers with sample arguments to catch drift. The model run uses fixtures throughout, so it leaves the board untouched. ### Check the values the browser expects The static catalog includes `create_task` alongside the imperative tools. A local run exposed a mismatch: the model sent `High`, the label it saw, but the form expected the value `high`. The form now uses `Low`, `Medium` and `High` as both labels and values. Chrome can represent them as a simple enum, and the submit handler lowercases the selected value before saving. You can compare the catalog with the browser’s generated schema in **Application → WebMCP** in Chrome DevTools. [Form source](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/index.html) · [Static tool catalog](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/schema.json) The demo’s November 15 run records **51 of 51 passing steps** with `gemini-3.5-flash` and three runs per case. Earlier attempts helped refine the expectations. For instance, `keyboard` is a valid substring search for “Check keyboard navigation,” and an indirect release-notes request can resolve to `DD-104` without a project filter. The passing steps describe the model’s calls in this run. [Recorded local run](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md#latest-local-run) ## Simulate an outcome on the live board What happens if you say “Complete the release notes task” and leave out the project? We want both cards to stay in their original lanes and the agent to ask which one you mean. The simulation can check both parts. Install Chrome Canary, the CLI’s default browser, and use the same Gemini key in `.env`. Start the app on port 5173, then run the simulation from another terminal. [Simulation setup](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md#run-the-outcome-simulations) ```sh npm run dev -- --port 5173 --strictPort ``` ```sh npm run eval:simulate -- --model google:gemini-3.5-flash --judge-model google:gemini-3.8-flash ``` The script runs `webmcp-evals simulate -u http://localhost:5173 -s evals/simulations.json`. Each trial starts with fresh browser storage and the example board. Here’s one assertion from the ambiguous-title case. It checks that the Design System card is still in **In progress**. ```json { "type": "dom", "selector": "[data-status='in-progress'] [data-task-id='DD-104']", "expect": { "exists": true } } ``` The other assertions check the DevDesk card and the number of cards in **Done**. The case’s `successCriteria` asks the model judge to check that the agent names both projects and asks which task the user meant. Another case uses a simulated user who supplies the project only after the agent asks. Both agent and judge can make billable model requests. [Live simulation cases](https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/simulations.json) The branch contains seven simulations. A live run is still pending, including the creation case where the browser waits for a person to submit the form. That case expects the board to keep its original six cards. If the runner times out while the form is waiting, inspect the pending review and record the timeout. ## Try a paraphrase Change the ordered case prompt to “The release notes for the design system are ready. Can you close that task?” Run the local evaluation again and check which ID the model chooses. Then try the same wording in the qualified-title simulation and check where `DD-104` and `DD-101` end up. The call trace shows what the model tried. The DOM assertions show where the cards landed. In the final chapter, we’ll use a coding-agent skill to build a task archive with human review.