Repository navigation
Register WebMCP tools for browser agents (Lighthouse Agentic Browsing) - #27
Merged
Merged
Conversation
Lighthouse's Agentic Browsing category failed "WebMCP tool registration": the site registered no tools. WebMcpTools (root layout) now registers five with document.modelContext.registerTool when the browser supports it: - search_architecture_templates, search_system_design_tutorials (read-only; fetch the new static /catalog.json on demand) - open_template_in_editor (/editor?template=) - generate_architecture_diagram (/editor?generate=, counts toward quota) - open_archdraw_page (fixed list of public pages) Tools only navigate to same-site paths they build. Optional NEXT_PUBLIC_WEBMCP_ORIGIN_TRIAL adds the Chrome origin-trial meta tag. /catalog.json is allowed in robots.txt.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
robots.ts: keep both sides (catalog.json + the SEO pages). open_archdraw_page now also lists the glossary, the free tools and the comparisons.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lighthouse's Agentic Browsing category scored 2/3. The failing check was WebMCP tool registration: the site registered no tools that a browser agent can call.
components/providers/WebMcpTools.tsx, mounted in the root layout, now registers five tools withdocument.modelContext.registerTool. In browsers without WebMCP it does nothing, and it removes the tools on unmount.search_architecture_templatessearch_system_design_tutorialsopen_template_in_editor/editor?template=<id>generate_architecture_diagram/editor?generate=<description>; counts toward the AI quotaopen_archdraw_pagelib/site/webmcpTools.ts, pure and tested. The tools only navigate to same-site paths they build themselves; an agent can't pass in a URL./catalog.jsonwith templates and tutorials, fetched only when a search tool runs, so pages don't carry the list. It's allowed inrobots.txt.NEXT_PUBLIC_WEBMCP_ORIGIN_TRIALadds the Chrome origin-trial meta tag (documented in.env.example).Test plan
tscclean, site and design-guard tests pass (76), eslint clean/catalog.jsonserves locallychrome://flags/#enable-webmcp-testing: on the preview,await document.modelContext.getTools()lists the five toolsNEXT_PUBLIC_WEBMCP_ORIGIN_TRIALin Vercel