create_note
Create a new note in the notebook. Returns the new note id and title.
Parameters:
| title | string, required | Note title |
| content | string, optional | Note body (markdown or plain text) |
Returns:
{ id, title }
xNotePadAI exposes 5 tools directly inside the browser tab using the emerging WebMCP API. An AI agent running in your browser can discover and call these tools directly in the xNotePadAI app, where your notes live — no API key, no server round-trip, no configuration.
A self-declared badge: xNotePadAI exposes WebMCP tools to in-browser AI agents. WebMCP is a proposed standard with no formal certification — this is a factual capability statement, not an official seal.
Your notes are client-side encrypted — the plaintext only ever exists in your browser, never on our servers. A remote MCP server can never see that content. But a WebMCP agent runs inside the browser, where your notes are already decrypted for you. So an agent can genuinely read and write real note content without any plaintext leaving your device. That's a guarantee a server-only note app cannot make.
| WebMCP (in the app) | MCP server | |
|---|---|---|
| Where it runs | Inside your browser tab | Remote Cloudflare Worker |
| Entry point | document.modelContext | POST /api/mcp/ |
| Sees encrypted notes? | Yes — decrypted in-browser | No — server never has plaintext |
| Auth | None — you're already the user | Bearer token per tenant |
| Best for | Browser agents (future Chrome AI, Playwright) | Desktop agents (Claude, Cursor, ChatGPT) |
| Tools | 5 core note actions | 13 full tools → |
Note: tool names differ slightly between the two surfaces — e.g. tagging is add_tag in WebMCP and tag_note on the MCP server. Use the names listed for whichever surface you're on.
Create a new note in the notebook. Returns the new note id and title.
Parameters:
| title | string, required | Note title |
| content | string, optional | Note body (markdown or plain text) |
Returns:
{ id, title }
Search notes by a query string in title or content. Returns matching notes (id + title), up to 25.
Parameters:
| query | string, required | Search text |
Returns:
{ count, results: [{ id, title, updated_at }] }
List all notes (id, title, updated_at), newest first, up to 100.
Parameters:
None
Returns:
{ count, notes: [{ id, title, updated_at }] }
Get the full content of a note by its id.
Parameters:
| id | string, required | Note id |
Returns:
{ id, title, content, tags, updated_at }
Add a tag to a note by its id. Tags are de-duplicated automatically.
Parameters:
| id | string, required | Note id |
| tag | string, required | Tag to add |
Returns:
{ id, tags }
Where the tools run: the 5 tools are registered on the xNotePadAI app itself — that's where your (decrypted, in-browser) notes are. This documentation page describes them; to actually discover and run them, open the app.
WebMCP is experimental. Today you need Chrome Canary or Beta (146+) with the flag
#enable-webmcp-testing set to Enabled, then relaunch.
(A second flag, #devtools-webmcp-support, is only needed if you also want the DevTools WebMCP Inspector panel — it isn't required for the API itself.)
Then open the app and run the following in its DevTools console — you're acting as the AI agent:
1. Discover the tools
await document.modelContext.getTools() 2. Create a note (agent side)
const tools = await document.modelContext.getTools();
const t = tools.find(x => x.name === "create_note");
await document.modelContext.executeTool(
t,
'{"title":"Made by an agent","content":"Hello from WebMCP"}'
); Calling convention (current Chrome preview):
document.modelContext (recent builds); navigator.modelContext is the older, deprecated location.executeTool takes the tool object from getTools() as its first argument — not the tool name.✅ Browser-automation agents — Playwright, Puppeteer, browser-use and similar can open the app and call the tools today (with the Canary/Beta flag).
⏳ The browser's built-in agent — once Chrome ships WebMCP to stable, an in-browser AI will call these tools automatically on whatever page you're on. Not in stable Chrome yet.
➡️ Desktop agents (Claude, Cursor, ChatGPT) — these connect to remote MCP servers, not a browser tab. For them, use the MCP server instead.