# WebMCP in Practice — Build a WebMCP Tool with a Coding-Agent Skill > Install Chrome’s WebMCP skill, design a tool that asks for human confirmation, and use DevDesk’s archive workflow to review the implementation. - **Author**: Luca Del Puppo (@puppo92) — AI Native Engineer at Nearform - **Published**: Nov 30, 2026 - **Canonical URL**: https://blog.delpuppo.net/webmcp-in-practice/webmcp-coding-agent-skills/ - **Series**: WebMCP in Practice (Part 6 of 6) — 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/) - Part 6: [WebMCP in Practice — Build a WebMCP Tool with a Coding-Agent Skill](https://delpuppo.net/blog/webmcp-in-practice/webmcp-coding-agent-skills/) **(Current Article)** --- “Archive the completed DevDesk tasks.” Before anything disappears from the board, I want to see which cards will move. And if the board changes while I’m reading that list, I want a fresh review before I confirm. We’ll use that request to walk through Chrome’s `build-webmcp-tools` skill. It gives a coding agent guidance for designing, implementing, and auditing WebMCP tools. The coding agent works on the DevDesk source. Later, a browser agent calls the tool that DevDesk exposes. ## Install the skill in your project Start from Part 05 if you want to build the feature yourself. The board already has shared state, two imperative tools, and tests you can build on. Use Node.js 26 or later. ```sh git clone https://github.com/Puppo/webmcp-in-practice.git cd webmcp-in-practice git switch part-05-agent-evaluations git switch -c archive-with-webmcp-skill npm ci npx skills add https://github.com/GoogleChromeLabs/webmcp-tools \ --path webmcp-skills --skill build-webmcp-tools --agent antigravity --yes ``` The last command uses the Vercel Labs Skills CLI to install Chrome’s `build-webmcp-tools` skill and its reference files in this project’s `.agents/skills` directory. Open the DevDesk checkout in Antigravity and start a new session so it can discover the skill. If you use another coding agent, change `--agent antigravity` to its supported name. [Skills CLI](https://github.com/vercel-labs/skills) · [Chrome’s WebMCP skills installation guide](https://github.com/GoogleChromeLabs/webmcp-tools/tree/main/webmcp-skills) ## Design the confirmation before writing code The skill supports different starting points, including designing one tool and implementing an approved design. Here the goal is already clear, so start with the archive workflow and ask for the design first. This is a prompt you can use: > Use the build-webmcp-tools skill to design one imperative tool for DevDesk. Inspect the current board state, tool registration, and storage code before proposing changes. The user wants to archive completed tasks, optionally for one project. Show exactly which cards would move and wait for the user to confirm in the page. Walk through success, cancellation, and a board change during review. Return a proposed input schema and acceptance checks before editing files. Read the proposed flow as if you were using the app. When someone asks to archive the Design System tasks, the agent can supply the project name, and the page can identify the completed cards. The person still decides whether those exact cards should move. That decision belongs in the dialog. A `confirmed` input would let the caller supply the decision itself. | Situation | Expected behavior | | --- | --- | | Completed tasks match the project | Show their IDs, titles, and projects. Leave the board unchanged while review is open. | | Nothing matches | Return a no-change result and skip the dialog. | | The user confirms | Move only the reviewed cards and report whether the save succeeded. | | The user cancels or the request ends | Leave the active tasks and archive as they were. | | The board changes during review | Return `STALE_PREVIEW` and ask for a fresh review. | ## Turn the approved design into code Once the flow looks right, give the coding agent an implementation request: > Implement the approved archive flow in the existing TypeScript app using the build-webmcp-tools skill. Register `archive_completed_tasks` with an optional string `project` and reuse the current registration and board update paths. Connect it to a page dialog. Save only after confirmation and reject a stale preview. Preserve existing saved boards. Add tests that check active tasks and archived tasks before and after each outcome. Run `npm test` and `npm run build`, then show me where confirmation is enforced. The skill gives the agent a place to check the tool schema, description, and response behavior. The app supplies the feature rules. In the reference implementation, the [tool adapter](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/webmcp.ts) validates the optional project and waits for the review controller. The [controller](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.ts) keeps the operation pending while the dialog is open. The confirm handler checks the revision and calls the board’s save path. When you review the patch, follow that call chain. Look for a write before confirmation, a second route that can skip the dialog, or a fresh query on confirm that might pull in cards the user never saw. Ask the coding agent to audit those paths against the acceptance checks, then read the diff yourself. If your browser supports WebMCP, use Chrome DevTools’ **Application → WebMCP** panel to inspect the tool and try the project filter. [Chrome’s WebMCP debugging guide](https://developer.chrome.com/docs/devtools/application/webmcp) ## Run the reference implementation Use a separate checkout to compare your patch with the completed Part 06 example. [Part 06 demo](https://github.com/Puppo/webmcp-in-practice/tree/part-06-coding-agent-skills) ```sh git clone https://github.com/Puppo/webmcp-in-practice.git cd webmcp-in-practice git checkout part-06-coding-agent-skills npm ci npm test npm run dev ``` Open the URL printed by Vite. For the interactive archive exercise, you’ll need a browser and inspector or agent that can discover and invoke the native imperative tool. The automated tests cover the review logic with test doubles, including simulated dialog events. Native browser-agent execution has not been verified for this checkpoint. [Chrome’s imperative WebMCP guide](https://developer.chrome.com/docs/ai/webmcp/imperative-api) · [Archive review tests](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.test.ts) ## Review the tasks before moving them On a reset board, move `DD-104`, the Design System release notes, to **Done**. Then call `archive_completed_tasks` with `{ "project": "Design System" }`. The dialog should list that task, with its ID, title, and project. Completed tasks from other projects stay out of that review. Omitting `project` includes all completed tasks. Select **Cancel** the first time and check that the card stays in **Done**. Invoke the tool again and select **Archive these tasks**. The card should move to the read-only archive below the board. The task is still there if you need to read it. The tool’s input has no confirmation argument. The app waits for the dialog’s confirm action before it applies the move. [Tool definition](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/webmcp.ts) · [Dialog markup](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/index.html) ![Archive review dialog listing DD-104 with Cancel and Archive these tasks buttons](/images/webmcp-in-practice/06-review.webp) *The dialog shows the exact task before confirmation. The screenshot was captured after calling the registered tool in Chrome Canary.* ## Apply the reviewed snapshot When the dialog opens, DevDesk captures the eligible task records and the board’s revision. Every update through the board state increments that revision. The confirm handler checks it before applying the archive. [Archive operations](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive.ts) · [Board state](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/state.ts) ```typescript export function applyArchive( preview: ReturnType, currentRevision: number, tasks: readonly Task[], archived: readonly Task[], ) { if (preview.revision !== currentRevision) { return { ok: false as const, code: 'STALE_PREVIEW' } } const ids = new Set(preview.tasks.map(task => task.id)) return { ok: true as const, tasks: tasks.filter(task => !ids.has(task.id)), archived: [...archived, ...preview.tasks], } } ``` If the revision differs, the operation returns `STALE_PREVIEW` and asks for a new review. If it matches, the app moves only the reviewed IDs. **Cancel**, Escape, an invocation abort, or the two-minute timeout ends a pending review without moving anything. The dialog blocks ordinary interaction with the board behind it. The stale-review test simulates a state change by advancing the revision before confirming. The revision belongs to the current page, so this check covers state changes in that page. [Review controller](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.ts) DevDesk saves active and archived tasks together under a version 2 storage key and reports `persisted` after a move. When the new key is absent, it can load the old board with an empty archive. The next save writes the new snapshot and leaves the original intact. Earlier checkpoints still read their original snapshot. The storage tests cover this migration, archive reload, and duplicate IDs across the two collections. [Archive storage](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-storage.ts) · [Storage tests](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-storage.test.ts) ## Check the result A successful tool response is only part of the check. In the [archive review tests](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.test.ts), the archive starts empty, stays empty while review is pending, and contains `DD-104` after confirmation. The cancellation and stale-review tests also check that `DD-104` is still on the active board. Those assertions catch a patch that returns the right response while changing the wrong state. [Part 05 — Test Agent Outcomes, Not Just Tool Calls](https://blog.delpuppo.net/webmcp-in-practice/webmcp-agent-evaluations/) The reference branch carries forward Part 05’s local evaluations and live simulations and adds `archive_completed_tasks` to the static tool catalog. The inherited cases still exercise the earlier board workflows. Use the archive review tests above to check confirmation and cancellation. [Reference evaluation guide](https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/docs/evaluations.md) If you want to measure what the skill adds, repeat the exercise in two clean checkouts from the same Part 05 revision. Keep the prompt, model, and checks fixed, and give only one session access to the skill. Compare the diffs, the outcomes, and the corrections each patch needed. The demo is a reference implementation for this walkthrough. A controlled comparison is still to run.