For the agent-readable index of this site, see /llms.txt.
@void-energy/webmcp
Agent-callable runtime
Every Void Energy site exposes its runtime affordances to in-browser AI
agents via the W3C WebMCP draft (navigator.modelContext). The system tools below register on
mount through WebMCPHost.svelte in Layout.astro;
consumer-defined tools register alongside via the customTools prop.
Browser support
WebMCP shipped behind a flag in Chrome 146 (Feb 2026). Until other
browsers follow, this page detects support and the adapter no-ops
cleanly in unsupported browsers — your VE site remains identical for
every user; agents that can call navigator.modelContext get
the surface for free.
navigator.modelContext
Not detected
Live engine snapshot
This is the exact payload void_get_state returns to an agent
right now. It updates reactively as you change atmosphere / density / open
a modal elsewhere.
{
"atmosphere": "frost",
"mode": "dark",
"physics": "glass",
"density": "standard",
"scale": 1,
"openModal": null,
"shortcutCount": 0,
"navCount": 5
} System tool catalog
13 tools register with navigator.modelContext on mount. Two
require explicit user confirmation through the existing modal.confirm singleton via agent.requestUserInteraction; the rest trust the browser's
native consent layer.
void_get_state Snapshot of current atmosphere, mode, physics, density, scale, open modal, auth.
void_list_atmospheres Built-in + custom atmospheres available in the registry.
void_set_atmosphere Switch to a known atmosphere id. Reversible.
void_set_preferences Update density / scale / fontHeading / fontBody.
void_apply_temporary_theme Preview a theme without persisting.
void_list_modals Modal fragment keys registered on this page.
void_open_modal Open a modal by key. User can dismiss.
void_close_modal Close the active modal.
void_toast Show a transient toast (info / success / error / warning / loading).
void_list_shortcuts Registered keyboard shortcuts on this page.
void_fire_shortcut Invoke a registered shortcut. Confirmation required.
void_list_pages Top-level navigation destinations.
void_navigate Navigate to a path. Confirmation required.
Extending with custom tools
Pass a customTools array into <WebMCPHost /> (or compose your own provider) to register consumer-defined tools alongside
the VE system set. Tools are spec-compliant ToolDescriptor objects.
import { WebMCPProvider } from '@void-energy/webmcp';
const customTools = [{
name: 'app_submit_order',
description: 'Submit the active order',
inputSchema: {
type: 'object',
properties: { confirm: { type: 'boolean' } },
required: ['confirm'],
additionalProperties: false,
},
execute: async ({ confirm }, agent) => {
if (!confirm) return { content: [{ type: 'text', text: 'Pass { confirm: true } to submit.' }] };
const ok = await agent.requestUserInteraction(() =>
new Promise(resolve => modal.confirm(
'Submit order?',
'This will charge your card.',
{ onConfirm: () => resolve(true), onCancel: () => resolve(false) },
))
);
if (!ok) return { content: [{ type: 'text', text: 'User declined.' }] };
await submitOrderAPI();
return { content: [{ type: 'text', text: 'Order submitted.' }] };
},
}];
<WebMCPHost {customTools} />