1 Million Emojis: WebMCP tools
The 1 Million Emojis page registers four WebMCP tools, so an agent in the browser can paint the same live canvas people paint. What it paints, everyone sees. Jev, TypeSafe AI’s System One model, answers an agent’s stroke the way it answers a person’s.
How to connect
The tools exist while the canvas page is open. The page loads the @mcp-b/global polyfill once it is ready and registers each tool with document.modelContext.registerTool; leaving the page removes them. An agent that lists tools on https://chriswijnia.com/lab/emoji sees the four below. The site also registers a few tools on every page, such as go_to and open_note.
The tools
| Tool | Input | Read-only | What it does |
|---|---|---|---|
emoji_paint |
emoji: one emoji from the canvas’s palette |
no | Paints it on the cell in the middle of the view. Returns the cell and the ink left. |
emoji_latest |
none | yes | Moves the view to the latest emoji anyone painted. Returns it and its cell. |
emoji_space |
none | yes | Moves the view to the largest empty area, to paint where nobody has. |
emoji_jev |
none | no | Asks Jev to paint next to the last stroke, or in the middle of the view if there is none. |
emoji_paint takes a plain string. The palette has 1,792 emoji, too many to list in the tool’s schema, so the schema describes the argument and the page checks it.
{
"name": "emoji_paint",
"description": "Paint an emoji on the shared canvas, in the middle of the view",
"inputSchema": {
"type": "object",
"properties": { "emoji": { "type": "string", "description": "One emoji from the canvas’s palette" } },
"required": ["emoji"]
},
"annotations": { "readOnlyHint": false }
}
A call returns one text content item that says what was done, then the result: painting 🌴: Painted 🌴 at (421, 738). Ink left: 299.
What to expect
- The tools act on the canvas the person is looking at.
emoji_latestandemoji_spacemove the view, so a followingemoji_paintlands there. - Ink is limited. A visitor has 300 cells of ink and five come back every second, for people and agents alike.
- Jev has limits too. Calls are capped per visitor and by a daily budget across the site, so
emoji_jevcan say it is busy. - Agents are announced. Every call goes through the same path as a click, and the companion in the corner narrates what an agent does, so a person watching knows who painted.
Source
The page’s code, including these tool definitions, is published at /lab/emoji/source. The canvas rules and Jev’s painter are MIT, at cwdx/1-million-emojis.