Migrating from raw WebMCP
Add Agentronics to a site that already registers WebMCP tools with document.modelContext.
Migrating from raw WebMCP
If your site already calls document.modelContext.registerTool(...), Agentronics wraps that surface — it doesn't replace your tools. You keep your implementations and gain detection, authentication, authorization (including review), per-tool status, procedural memory and observability.
What changes
| Stays the same | Now goes through Agentronics |
|---|---|
name, title, description, inputSchema, annotations | Each call is checked against your rules first (allow / review / deny) |
Your execute logic and return values | The session is attributed to the agent that called |
| WebMCP agents keep working unchanged | Registration status and call outcomes are traced to the console |
| Approved descriptions from the console can replace the text agents see |
Pattern 1 — move registrations into the SDK
Before:
After:
The SDK owns the AbortControllers: it unregisters and re-registers when the set of tools a given agent may see changes. Drop your own registerTool calls once a tool moves over.
Pattern 2 — keep your registrations, add a policy check
If your registration code is hard to move, call evaluate() inside execute:
You keep policy enforcement and traces, but lose automatic review prompts, per-tool status, approved descriptions and identity-based surfacing.
Pattern 3 — agents that click instead of calling tools
Browser-automation and vision agents use your UI directly. Mark the controls and install the enforcer:
Rules for checkout now apply to clicks from those agents too.
Declarative forms
The declarative API (<form toolname tooldescription>) was removed from the WebMCP spec in October 2026 and is only an explainer now. If you used it, register those forms as imperative tools that fill and submit the form — Agent Nic generates exactly that when it writes tools for your repo.