navigator.modelContext.registerTool); the agent calls them, and they run in the visitor’s browser, with the visitor’s session on your site.
Site actions are available on Builder plans and higher (the
externalMcp capability). On lower plans, declared tools are simply ignored.How it works
- You declare your actions — standard WebMCP, reusing your own front-end APIs. The agent only ever sees the schema, never your code or secrets.
- The agent calls them — during a conversation, the Animam agent decides to call an action. Read-only actions run immediately; write actions ask the visitor to confirm first.
- It runs in the browser —
execute()uses the visitor’s existing session on your site (cookies, CSRF), so your normal auth applies.
Declare a tool
The Animam widget installs anavigator.modelContext polyfill on load, so you can use the standard WebMCP API — it works with the Animam agent today, and with browser-native agents (Chrome) when they ship.
AnimamChat.registerTool(tool) if you prefer not to touch navigator. Register after the widget is ready:
Read-only vs mutating
readOnlyHint | Confirmation | |
|---|---|---|
| Read-only (lookup, search, get) | true | none — runs immediately |
| Mutating (add, book, pay, delete) | omitted / false | the widget shows a Confirm / Cancel card before execute() |
execute() function and the tool’s annotation — so the model cannot bypass it. A declined action returns { status: 'cancelled' } to the agent.
Tool design
- Reuse your real APIs. Tools call your existing endpoints, not duplicated logic.
- Return structured data (objects/arrays), summarized — never large HTML blobs.
- Write clear descriptions. The agent decides when to call a tool purely from its
descriptionandinputSchema. - Validate server-side. Treat the agent’s input as untrusted form input — your endpoints enforce the rules.
- Action-oriented names:
add_to_cart,search_inventory,go_to_step.
Security
- The agent receives only the tool schema — never your secrets or your
execute()code. - Mutating actions require explicit visitor confirmation, enforced in the browser.
- Tools run with the visitor’s own session on your site, so your existing auth / CSRF / rate-limit protections apply.
- Site actions are gated to Builder+.
Standard, no lock-in
WebMCP is a neutral W3C standard. The same registration serves the Animam agent (every browser, today) and browser-native agents (Chrome) when they ship — you’re additive, not locked into a proprietary API.See it live
The site-actions overview page.