Exposes the page's charts to in-browser AI agents as WebMCP tools, for as
long as the returned handle is held.
Every mounted chart holds one; the tools are registered once, by the first
mount that finds them enabled and no other copy of MAIDR providing them,
and serve every chart in the registry. They are removed
a tick after the last handle is disposed, so a remount in the same tick --
React StrictMode, an adapter re-initialising -- does not churn them.
Experimental, and a strict no-op unless the reader's general.agentTools
setting allows it (the default), the page does not carry
<meta name="maidr-webmcp" content="off">, it is a secure context, and it
runs in a browser that has document.modelContext (or the deprecated
navigator.modelContext). See docs/WEBMCP.md.
Exposes the page's charts to in-browser AI agents as WebMCP tools, for as long as the returned handle is held.
Every mounted chart holds one; the tools are registered once, by the first mount that finds them enabled and no other copy of MAIDR providing them, and serve every chart in the registry. They are removed a tick after the last handle is disposed, so a remount in the same tick -- React StrictMode, an adapter re-initialising -- does not churn them.
Experimental, and a strict no-op unless the reader's
general.agentToolssetting allows it (the default), the page does not carry<meta name="maidr-webmcp" content="off">, it is a secure context, and it runs in a browser that hasdocument.modelContext(or the deprecatednavigator.modelContext). Seedocs/WEBMCP.md.