Hi,
I’ve been building on the WebMCP Early Preview and just published the result (still a WIP). Sharing here because once I moved past demos and tried to build something real, a few gaps became pretty clear.
What I builtBrainstorm — a local-first canvas where an AI facilitator operates on the board itself.
No sidebar chat. The agent uses tools to:
Everything goes through explicit WebMCP tools.
Link
I’m registering:
Tools are scoped with AbortController and re-register on phase changes.
To understand the surface area, I built against three modes:
W1 — Consume tools from the active tab (extension)
Works, but requires MAIN-world injection + explicit user consent.
W2 — Expose tools from an extension side panel
Fully built, but currently blocked (see below).
W3 — Expose tools from a standalone web app
This is what’s live now. It’s the only path that’s clearly aligned with the current spec.
Once I moved beyond toy examples, these came up pretty quickly:
1. MAIN-world is a hard requirement (not documented clearly)navigator.modelContext only exists in the page (MAIN world).
Content scripts see undefined.
The only working path is: chrome.scripting.executeScript({ world: 'MAIN' })
This isn’t obvious from the docs, but it’s an architectural constraint.
There’s no standard listTools().
If you want to discover tools on a page, you end up relying on non-public internals or guessing. If that changes, things silently break.
This feels like a missing primitive.
It’s not clear whether navigator.modelContext is (or will be) available in chrome-extension:// origins.
This is a big one:
Right now I’ve paused W2 because of this.
StrictMode double-mounts effects.
Abort doesn’t always clear fast enough → duplicate tool name errors.
I had to wrap registration in a safe helper.
This will likely hit anyone using React.
Cross-world calls mean:
I ended up wrapping errors in a serializable format.
Not obvious until you hit it.
Reading tool metadata is one thing.
Invoking tools runs code in the page.
Auto-invoking technically works, but feels wrong.
I ended up with:
Feels like this needs a recommended pattern.
From actually building on this, a few things would go a long way:
Happy to walk through the code or share more details if useful.
— Adi
- Guidance on registration lifecycle (React / StrictMode)
- A short host implementation guide covering:
- MAIN-world constraint
- structured-clone limits
- consent patterns
Happy to walk through the code or share more details if useful.
— Adi
--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/7ff40b30-6d35-40fd-a9b7-00138108ae99n%40chromium.org.