Kilian Valkhof shows how to register tools for AI agents with document.modelContext.registerTool(), write descriptions and schemas agents understand, mark irreversible actions with consequentialHint, and validate input, since browsers don’t. Polypane’s WebMCP panel lists the tools, flags schema errors, and runs them from a generated form. WebMCP is Chromium-only for now.
polypane.app/blog/getting-started-with-webmcp-building-and-testing-tools
