browser-native web ai & webmcp playground
Test our production client-side Web AI stack directly in your browser. Inspect and execute live WebMCP tools registered on document.modelContext and declarative HTML forms, probe Chrome Built-in AI (Gemini Nano) APIs with live Firebase AI Logic & Edge fallback, and run zero-backend WebGPU / Float32 semantic vector search.
Imperative API (document.modelContext)
registerTool()Select any WebMCP tool registered on this page to inspect its typed JSON Schema contract and execute its in-tab handler with same-origin session locality.
{
"name": "search_content",
"description": "Search CodingCat.dev tutorials, blog posts, courses, and podcasts by technical topic",
"annotations": {
"readOnlyHint": true,
"untrustedContentHint": true
},
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Keyword or technology (e.g. WebMCP, Gemini Nano, WebGPU, Astro)"
}
},
"required": [
"query"
]
}
}Live Tool Execution Response
JSON-RPC / Structured ResultClick "Execute WebMCP Tool" to run the registered handler in your browser session.
Declarative API (<form toolname="...">)
Zero-JS Schema DiscoveryThis HTML form includes standard W3C WebMCP attributes (toolname, tooldescription, and toolparamdescription) so browser agents can synthesize a tool contract without executing custom scripts.
{
"protocol": "webmcp-declarative/1.0",
"toolname": "search_codingcat_catalog",
"tooldescription": "Search CodingCat.dev courses, podcasts, and blog posts by keyword and content pillar",
"toolautosubmit": true,
"action": "/api/search",
"method": "GET",
"inputSchema": {
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Technical keyword or framework name (for example: Astro, Sanity, WebMCP, Firebase)"
},
"type": {
"type": "string",
"enum": [
"post",
"course",
"podcast"
],
"description": "CodingCat.dev content pillar filter (post, course, podcast)"
}
},
"required": [
"q"
]
}
}Web AI & Agent Architecture Trade-Off Matrix
How modern browser-native AI capabilities compare across latency, privacy, token economics, and ideal production workloads:
| Web AI Layer | Browser API / Standard | Network Latency & Cost | Best Production Use Case |
|---|---|---|---|
| WebMCP (Client-Side Agent Tools) | document.modelContext.registerTool & <form toolname> | 0ms IPC / 90% fewer agent tokens | Exposing authenticated in-tab actions (search, filters, checkout, speaker kits) to browser AI assistants without fragile DOM scraping. |
| Chrome Built-in AI (Gemini Nano) | LanguageModel, Summarizer, Rewriter, Translator | 0ms RTT / $0 per 1M tokens | Privacy-sensitive drafting, instant article summaries, offline-capable UI helpers, and zero-cost pre-classification. |
| Client-Side WebGPU / WebNN | navigator.gpu + Transformers.js v3 / MediaPipe + OPFS | 0ms RTT / Local GPU Shaders | Local 384-d embeddings, client-side RAG over OPFS/IndexedDB, and real-time vision/audio inference. |
| Hybrid Edge AI Fallback | Firebase AI Logic (Gemini Flash) / Cloudflare Workers | 120ms to 380ms RTT / Metered API | Fallback for devices without local NPU/GPU weights or complex multi-step reasoning and large context windows. |