The story of Givens

Givens is a Sudoku studio where a person and an agent share one live grid. The agent names the next technique and highlights the cells. You decide whether to fill, lock, or take one safe step.

What inspired this

I am an avid sudoku solver and have had countless moments where I make good progress on the puzzle itself but then I've gotten stuck on some step. Now, there are online resources and guides and communties that can help out here, but I thought WebMCP was an interesting solution to this problem.

A complete solution is a string of 81 digits. If the agent dumps it in chat, the page was pointless. If it clicks around the DOM, it will mis-click. The product I wanted is the thing in between: collaborative deduction.

What I learned

WebMCP is not MCP in the browser. MCP can live on a server with no page open. WebMCP tools exist only while a visible, origin-isolated document is connected. ChatGPT’s in-app browser also implements a subset:

Imperative document.modelContext.registerTool works. Declarative HTML form tools do not show up as site tools. Tools inside iframes are invisible, even same-origin. So registration has to happen on the top-level page, after the board mounts, with feature detection:

if (typeof document.modelContext?.registerTool === "function") {
  await document.modelContext.registerTool({ /* ... */ });
}

I also learned that Codex can solve Sudoku in its head. If the only write tool is set_cell, it will skip the tutor and emit 81 answers. Tool descriptions and every read_board snapshot have to say: do not dump the grid; change it only through tools; trust the snapshot, not memory.

On the puzzle side, computed candidates are not enough for pairs. A naked pair does not fill a cell; it removes digits elsewhere. That elimination has to be stored, or the next hint never sees it.

Bundled puzzles have to be uniquely solvable. One “evening” grid I wrote by hand had two solutions. The brute-force solver is a backtracking search over the cell with the fewest candidates; we keep going until we have 0, 1, or >1 completions, and we only ship grids with exactly one.

Built With

Share this project:

Updates

Submission history