Cosmic Books
Same bookstore. Two realities. On the left, an AI agent sees chaos. On the right, it sees clean, typed, callable tools.
The tools below are real — registered right now on this page via @webmcpregistry/react. Try them in the panel below, or open DevTools and call navigator.modelContext.getTools().
Cosmic Books
No SDKDune
Frank Herbert
Neuromancer
William Gibson
The Great Gatsby
F. Scott Fitzgerald
1984
George Orwell
Sapiens
Yuval Noah Harari
Project Hail Mary
Andy Weir
What an AI agent sees
<div class="shop-grid" id="main">
<div class="book-card" data-v-3a81f>
<div class="bc__cover" style="bg:#c27">
<span class="bc__badge">sci-fi</span>
</div>
<h3 class="bc__title">Dune</h3>
<p class="bc__author">Frank Herbert</p>
<span class="bc__price">$14.99</span>
<button class="btn btn--primary btn--sm
js-add-cart" data-pid="dune"
onclick="__cart.add('dune',1)">
Add to Cart
</button>
</div>
<div class="book-card" data-v-3a81f>
<div class="bc__cover" style="bg:#1a8">
...
</div>
...
</div>
<!-- 4 more cards... -->
</div>
<form id="search-form" class="sf"
action="/api/search" method="GET">
<input class="sf__input" name="q"
placeholder="Search books...">
<select class="sf__select" name="cat">
<option value="">All</option>
<option value="sci-fi">Sci-Fi</option>
...
</select>
</form>The agent must:
1. Parse HTML → guess what .btn.js-add-cart does
2. Reverse-engineer __cart.add('dune',1)
3. Fill form inputs → submit → scrape response page
4. Hope selectors don't change in the next deploy
5. No idea if any action is destructive
Cosmic Books
WebMCP EnabledDune
Frank Herbert
$14.99
Neuromancer
William Gibson
$12.99
The Great Gatsby
F. Scott Fitzgerald
$9.99
1984
George Orwell
$11.99
Sapiens
Yuval Noah Harari
$16.99
Project Hail Mary
Andy Weir
$15.99
What an AI agent sees
[
{
"name": "search_books",
"description": "Search the Cosmic Books
catalog by keyword, genre, or price",
"safetyLevel": "read",
"inputSchema": {
"properties": {
"query": { "type": "string" },
"genre": { "enum": ["sci-fi",
"fiction", "dystopian",
"non-fiction"] },
"max_price": { "type": "number" }
}
}
},
{
"name": "add_to_cart",
"description": "Add a book to the cart",
"safetyLevel": "write",
"inputSchema": {
"properties": {
"book_id": { "type": "string" },
"quantity": { "type": "integer" }
},
"required": ["book_id"]
}
},
{
"name": "get_book_details",
"description": "Get full book details",
"safetyLevel": "read",
"inputSchema": {
"properties": {
"book_id": { "type": "string" }
},
"required": ["book_id"]
}
}
]The agent calls:
search_books({ genre: "sci-fi", max_price: 20 })
→ Typed JSON with 3 results, prices, ratings, IDs
add_to_cart({ book_id: "dune" })
→ { success: true, message: "Added 1x Dune to cart" }
Discovery
Interaction
Safety
Try It Live
Click an example to execute a real WebMCP tool call on this page
Example Queries
Tool Call Log
Click an example to see the tool call and response here
These tools are live. Open DevTools console and run:
const tools = navigator.modelContext.getTools()await tools[0].execute({ genre: "sci-fi", max_price: 20 })3 tools registered on this page right now: search_books, add_to_cart, get_book_details