First testing of WebMCP

140 views
Skip to first unread message

Raymond Camden

unread,
Apr 24, 2026, 11:58:28 AM (11 days ago) Apr 24
to Chrome Built-in AI Early Preview Program Discussions
I'm probably doing something dumb, or misunderstanding, but I've added a simple test to my blog (just locally) for now that runs this:

async function registerTools() {
    if (!('modelContext' in navigator)) return;
    console.log('modelContext exists');

    const listCategories = {
        name: "listCategories",
        description: "List categories available for blog posts",
        inputSchema: {
            type: "object",
            properties: {},
        },
        execute: () => {
            console.log('mcp tool running');
            return ['ai', 'javascript', 'apis', 'web standards'];
        },
        annotations: { readOnlyHint: false, untrustedContentHint: true },
    };

    const controller = new AbortController();
    navigator.modelContext.registerTool(listCategories, { signal: controller.signal });
    console.log('mcp tool registered');

}

I open up Gemini in Chrome and ask about categories for the blog, but it never tries to actually run my tool. Is the Gemini in Chrome sidebar a proper way to test this?

Raymond Camden

unread,
Apr 24, 2026, 12:01:07 PM (11 days ago) Apr 24
to Chrome Built-in AI Early Preview Program Discussions, Raymond Camden
FYI, the extension (https://chromewebstore.google.com/detail/webmcp-model-context-tool/gbpdfapgefenggkahomfgkhfehlcenpd) is dang good. It confirms the tool was registered - so I'm guessing my expectation of how to test was *not* correct.

François Beaufort

unread,
Apr 24, 2026, 12:12:33 PM (11 days ago) Apr 24
to Raymond Camden, Chrome Built-in AI Early Preview Program Discussions
Gemini-in-Chrome doesn't support WebMCP yet. Using the "WebMCP - Model Context Tool Inspector" extension is the recommended way to test it for now indeed.

--
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/2d1a74ca-79b5-41f8-b39a-abf01bf7e55fn%40chromium.org.

Raymond Camden

unread,
Apr 24, 2026, 12:46:40 PM (11 days ago) Apr 24
to François Beaufort, Chrome Built-in AI Early Preview Program Discussions
Gotcha - and I see it requires a Gemini key. Is it safe to assume it's doing a basic API call with URL Context? (Like: https://www.raymondcamden.com/2026/02/09/creating-reddit-summaries-with-url-context-and-gemini
--
===========================================================================
Raymond Camden

Email : raymon...@gmail.com
Blog : www.raymondcamden.com

Raymond Camden

unread,
Apr 24, 2026, 12:55:06 PM (11 days ago) Apr 24
to François Beaufort, Chrome Built-in AI Early Preview Program Discussions
Also - I tested it on a random web page, and I got the error below. Is it not able to get the contents of a tab? This test was *not* a local file. 

User prompt: "what is this page talking about?"
AI result: I need to access the content of the page to tell you what it's talking about. Please allow me a moment to do that.

Using the `getFullPageContent` tool...
I am unable to retrieve the content of this page. This might be due to security restrictions, the page being a local file, or other technical limitations. Therefore, I cannot tell you what this page is talking about.

François Beaufort

unread,
Apr 24, 2026, 2:06:25 PM (11 days ago) Apr 24
to Raymond Camden, Chrome Built-in AI Early Preview Program Discussions
It doesn't require a Gemini API key. Only if you use Gemini.
And it doesn't use URL context. See https://github.com/beaufortfrancois/model-context-tool-inspector/blob/main/sidebar.js#L218

François Beaufort

unread,
Apr 24, 2026, 2:07:30 PM (11 days ago) Apr 24
to Raymond Camden, Chrome Built-in AI Early Preview Program Discussions
Is getFullPageContent a tool you registered?

Raymond Camden

unread,
Apr 24, 2026, 2:23:45 PM (11 days ago) Apr 24
to François Beaufort, Chrome Built-in AI Early Preview Program Discussions
Nope - I don't even know where that came from. :) 

François Beaufort

unread,
Apr 24, 2026, 3:05:11 PM (11 days ago) Apr 24
to Raymond Camden, Chrome Built-in AI Early Preview Program Discussions
Can I assume then it comes from Gemini-in-Chrome?

Raymond Camden

unread,
Apr 24, 2026, 3:07:01 PM (11 days ago) Apr 24
to François Beaufort, Chrome Built-in AI Early Preview Program Discussions
I've got no clue. I had just opened up the extension on my blog, I was using a Gemini key. I don't have WebMCP code on my blog, I was just trying to test. 

Raymond Camden

unread,
Apr 24, 2026, 3:07:49 PM (11 days ago) Apr 24
to François Beaufort, Chrome Built-in AI Early Preview Program Discussions
Also, are you saying the Gemini API key is not required for a prompt? When I hav eit cleared, I can't use the Send button.

Justina Crow

unread,
Apr 25, 2026, 1:11:28 AM (11 days ago) Apr 25
to Raymond Camden, François Beaufort, Chrome Built-in AI Early Preview Program Discussions
--
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.

Jacob DeOre

unread,
Apr 25, 2026, 7:26:18 AM (10 days ago) Apr 25
to Justina Crow, Raymond Camden, François Beaufort, Chrome Built-in AI Early Preview Program Discussions
I love it for the MCP server try adding a physical weight, this helps a lot with mapping, it's what I use, seems to be alright. Write it couple weeks so far love it. 




import math import hashlib import json class NVMEMapper:     def __init__(self, capacity_gb=1024, channels=8, dies_per_channel=4, blocks_per_die=4096, pages_per_block=256):         self.capacity_gb = capacity_gb         self.channels = channels         self.dies_per_channel = dies_per_channel         self.blocks_per_die = blocks_per_die         self.pages_per_block = pages_per_block         # Total pages in the "device"         self.total_pages = channels * dies_per_channel * blocks_per_die * pages_per_block         self.page_size_kb = 4  # Standard 4KB page     def get_physical_coordinates(self, filename):         """         Simulates the mapping of a file to a physical location on the NVMe.         Uses a hash of the filename to simulate the FTL's distribution logic,         but weighted towards the 'inner edges' (lower LBAs) for this specific task.         """         # Create a deterministic 'seed' from the filename         hasher = hashlib.sha256(filename.encode())         hash_int = int(hasher.hexdigest(), 16)         # In our theory, 'inner edges' are lower LBAs.         # We'll simulate 'density' by clustering files near LBA 0.         # Use a power distribution to favor smaller indices.         raw_index = hash_int % self.total_pages         inner_edge_index = int(math.pow(raw_index / self.total_pages, 2) * self.total_pages)         # Decompose index into physical geometry         page = inner_edge_index % self.pages_per_block         rem = inner_edge_index // self.pages_per_block         block = rem % self.blocks_per_die         rem = rem // self.blocks_per_die         die = rem % self.dies_per_channel         channel = rem // self.dies_per_channel         # Calculate Radial Coordinates (Theory)         # r = normalized distance from controller (channel 0, die 0)         # theta = angular position based on channel         r = (channel * self.dies_per_channel + die) / (self.channels * self.dies_per_channel)         theta = (channel / self.channels) * 360         return {             "physical": {                 "channel": channel,                 "die": die,                 "block": block,                 "page": page             },             "radial": {                 "r": round(r, 4),                 "theta": round(theta, 2),                 "z": block  # Using block height as Z-axis for 3D NAND theory             },             "lba": inner_edge_index         }     def generate_mapping_json(self, filename, metadata=None):         coords = self.get_physical_coordinates(filename)         mapping = {             "file": filename,             "coordinates": coords,             "logic": "Radial_Inner_Edge_Clustering",             "timestamp": "2024-10-23T00:00:00Z", # Placeholder             "density_score": round(1.0 - coords['radial']['r'], 4) # Higher density near r=0         }         if metadata:             mapping.update(metadata)         return mapping if __name__ == "__main__":     mapper = NVMEMapper()     test_file = "boot_driver_hp_pavilion.py"     mapping_data = mapper.generate_mapping_json(test_file, {"type": "driver", "community": 7})     print(json.dumps(mapping_data, indent

François Beaufort

unread,
Apr 28, 2026, 3:20:55 AM (8 days ago) Apr 28
to Justina Crow, Raymond Camden, Chrome Built-in AI Early Preview Program Discussions
On Sat, Apr 25, 2026 at 7:11 AM Justina Crow <justin...@gmail.com> wrote:

On Fri, Apr 24, 2026, 2:07 PM Raymond Camden <raymon...@gmail.com> wrote:
Also, are you saying the Gemini API key is not required for a prompt? When I hav eit cleared, I can't use the Send button.

The Gemini API key is required only for chatting. You can use the execute button without it if your page has WebMCP. See https://github.com/beaufortfrancois/model-context-tool-inspector/tree/main#usage 

On Fri, Apr 24, 2026 at 2:06 PM Raymond Camden <raymon...@gmail.com> wrote:
I've got no clue. I had just opened up the extension on my blog, I was using a Gemini key. I don't have WebMCP code on my blog, I was just trying to test. 

Without WebMCP code on your blog, there's not much you can do.
Reply all
Reply to author
Forward
0 new messages