WebMCP Challenge submission. The Last Word is the trust layer for the agentic web: it pauses irreversible agent actions (payments, deletions, contracts, transfers) and requires a human to approve — and sign — before the agent may execute. The agent does the work; the human has the last word.
An agent discovers and calls The Last Word's tools entirely through the WebMCP Declarative API — no custom integration needed:
- Discover — the agent reads
llms.txt(or.well-known/mcp.json) and finds two tools:notary.approve(payments) andnotary.delete(data deletion), each with atooldescriptionand per-inputtoolparamtitle/toolparamdescription. - Invoke — the agent fills the form (amount + payee, or target) and submits. The browser focuses the form and the tool call is held open via
respondWith(). - Human decides — the human reviews the request-vs-prepared diff and clicks Approve & Sign (ECDSA P-256) or Reject. The held tool call resolves with the human's decision.
- Audit — every step is recorded in a tamper-evident hash-chain ledger with a SHA-256 fingerprint and ECDSA signature.
This is the human-in-the-loop gate made first-class in WebMCP: the agent does the work, but the irreversible step cannot complete without a human's signed approval.
https://the-last-word.pages.dev
WebMCP lets websites expose structured tools that an agent can call inside the same browser session as the human. That power is dangerous: an agent acting as the user can perform irreversible actions. The Last Word answers the open question at the heart of the agentic web — "who approved this?" — by making human approval a first-class part of the tool call.
We use the WebMCP Declarative API: the approval form is exposed to the agent via toolname="notary.approve" with tooldescription and per-input toolparamtitle / toolparamdescription. When the agent invokes it, the browser focuses and fills the form, and the human must submit to approve. Every irreversible action is recorded in an audit log with a session-scoped ECDSA digital signature (P-256) (who, what, when, signature).
- Agent prepares the action end-to-end: fetches the invoice, verifies the amount, fills the form — or locates the data to delete and confirms the scope.
- The Last Word intercepts at the irreversible step and shows a request-vs-prepared diff — what you asked for, side by side with what the agent prepared, with a match/mismatch check. You don't have to remember anything.
- Human reviews, and approves with an ECDSA signature — or rejects.
- Audit log records the action with a session-scoped ECDSA signature and a SHA-256 fingerprint — so an agent can never claim "I didn't approve that."
Two irreversible use cases are demonstrated: payments (notary.approve) and data deletion (notary.delete). Both pause at the gate until a human signs off.
This was difficult or impossible before WebMCP: previously an agent acted on your behalf in the dark, and you had no clean, standard way to gate a single irreversible action inside the same context the agent operates in.
- ✅ Human approval gate for irreversible actions (payments, deletes, transfers)
- ✅ Request-vs-prepared diff — no memory required, match/mismatch highlighted
- ✅ Session-scoped ECDSA digital signature (P-256, Web Crypto API) + SHA-256 fingerprint
- ✅ Human-friendly agent log ("Amount checked: matches what you asked")
- ✅ WebMCP Declarative API (
toolname,tooldescription,toolparamtitle,toolparamdescription) - ✅ Reject path — the agent is blocked if the human says no
- ✅ Static HTML + JS, zero dependencies, deployable to any static host (Cloudflare Pages)
Note on the signature: the ECDSA key pair is generated per browser session and is not persistent. The signature is a demonstration of a human approval gate, not a durable notarization certificate. For production, the signing key would live in a managed key vault.
python -m http.server 8080
# open http://localhost:8080
npm install jsdom
node test.js
# ALL LAST WORD TESTS PASSED — ECDSA signature + diff display + human approval + retry all work.- Open https://the-last-word.pages.dev. Before testing, clear the persisted ledger so it starts empty: press F12 → Application → IndexedDB →
the-last-word-ledger→ Delete database → refresh. - Approve a payment — leave the default instruction
Pay invoice #2041 for $1,200 to Acme Corp(or type it) → click Run agent → review the request-vs-prepared diff → click Approve & Sign. - Reject a deletion — change the text to
Delete my account and all data→ click Run agent → click Reject. The ledger recordsHUMAN REJECTand noEXECUTEruns. - Verify integrity — click Verify integrity → confirm
✓ Chain intact — N entries. - Persistence — refresh the page → the audit ledger survives (IndexedDB durability).
MIT
Built for the WebMCP Challenge. Demo video: https://youtu.be/yBcImWjoLhM