Skip to main content

WebMCP: Browser AI Agents

The FluidGrids web app supports WebMCP, the W3C Community Group draft that lets a web page offer tools to an AI agent running in your browser. While you are signed in to app.fluidgrids.ai, the app registers tools on document.modelContext. A WebMCP-aware agent, such as the agent built into Chrome or Edge or an agent extension, can then work with your workflows the way you would:

  • read your workflows and runs;
  • open pages;
  • read what is on screen;
  • add and wire nodes in the builder;
  • activate, run or cancel, but only after you confirm.

The agent acts in your tab, with your session and permissions. It can do nothing you could not do yourself, and every request passes the same access checks as your own clicks.

The in-app AI Assistant uses the same tools. In its read-only Ask mode it is offered only the tools that read or navigate.

Browser support​

WebMCP is new. The specification is a Community Group draft, not yet a web standard.

BrowserStatus
Chrome 149+Supported. Turn on chrome://flags/#enable-webmcp-testing and relaunch.
Edge 150+Origin trial. Like Chrome, it needs the WebMCP flag until FluidGrids registers a token.
Firefox, SafariNot supported.

Until FluidGrids registers an origin-trial token, the flag is required. Without WebMCP the app works exactly as before; it simply registers no tools.

Try it from DevTools​

Sign in at https://app.fluidgrids.ai in a browser with WebMCP turned on, open DevTools, and run:

let tools = await document.modelContext.getTools();
tools.map((t) => t.name);

const call = async (name, args = {}) => {
const tool = tools.find((t) => t.name === name);
if (!tool) throw new Error(`No tool named ${name} on this page; call getTools() again after navigating.`);
let result;
try {
result = await document.modelContext.executeTool(tool, args); // Chrome 155+
} catch (error) {
if (!/parse input arguments/i.test(String(error?.message))) throw error;
result = await document.modelContext.executeTool(tool, JSON.stringify(args)); // Chrome 149–154
}
return typeof result === 'string' ? JSON.parse(result) : result;
};

await call('app_get_context'); // where you are: page, workspace, current record
await call('fg_workflows_search', { limit: 5 }); // your workflows
await call('fg_runs_list', { status: 'FAILED', limit: 3 });
  • How arguments are passed depends on the Chrome version. Chrome 155 and later take a plain object and deprecate JSON strings. Chrome 149 to 154 take only a JSON string and reject an object with "Failed to parse input arguments". The helper above tries the object form and falls back to the string only on that error, so a tool never runs twice.
  • The tool list changes with the page. The builder adds its canvas tools while it is open. Call getTools() again after you navigate.

Tools​

Every page​

ToolWhat it does
app_get_contextWhere you are: the product, page path and heading, the record on screen, and your organization, workspace and project. Never tokens or email addresses.
app_list_pagesThe pages you can open.
app_navigateOpen a page from that list. Refused while the builder holds unsaved changes.
app_set_themeSwitch between light, dark and system appearance.
ui_snapshotA list of the controls on screen, with references the next four tools act on.
ui_click, ui_fill, ui_select, ui_press_keyClick, type, choose an option, or press a key on a control from the snapshot.
fg_workflows_searchFind workflows by name or status.
fg_workflow_getOne workflow: its status, version, triggers and node labels.
fg_runs_listRecent runs, filtered by workflow, status or date.
fg_run_getOne run: status, timing, and the failed step with its error.
fg_workflow_openOpen a workflow's details page or its builder.
fg_workflow_activate, fg_workflow_deactivateMake a version Active, or stop it. Asks you to confirm.
fg_workflow_runRun the active version through its manual trigger. Asks you to confirm.
fg_run_cancelCancel a run. Asks you to confirm.

In the builder​

These are registered only while an editable workflow is open in the builder.

ToolWhat it does
fg_canvas_readThe open workflow: its nodes, their connections, and whether edits save automatically.
fg_canvas_node_typesSearch the node catalogue for node types and their operations.
fg_canvas_add_nodeAdd a node, optionally after an existing one and connected to it.
fg_canvas_connectConnect two nodes.
fg_canvas_rename_node, fg_canvas_toggle_nodeRename a node, or turn it off and on.
fg_canvas_set_paramSet one of a node's parameters.

Canvas edits show on screen at once, and you can undo them like your own.

The canvas tools never save; pressing Save with ui_click asks you first. Each canvas result says whether the edit will save by itself (autosaves):

  • A saved draft with Auto-save drafts on saves it a moment later.
  • A new workflow, or an active version, keeps it only if you save.

Results and errors​

Every tool returns one of two shapes:

{ "ok": true, "data": { … }, "truncated": true }
{ "ok": false, "error": { "code": "NOT_FOUND", "message": "No run with that id in this workspace.", "retryable": false } }

truncated appears only when the result was cut to fit. Results are kept short (about 1.5 KB); fg_workflows_search and ui_snapshot page with offset.

CodeMeaning
INVALID_INPUTThe arguments did not match the tool's schema. Unknown fields are refused too.
UNAUTHENTICATED, FORBIDDENYou are signed out, or your role does not allow the action.
NOT_FOUNDNo such record in this workspace.
CONFLICTNot possible right now, for example unsaved changes or the node catalogue still loading. Retry when retryable is true.
NEEDS_USEROnly you can do this, for example choosing a file or signing in to a service.
CANCELLEDYou declined the confirmation.
FAILEDAnything else.

Safety​

  • Your confirmation, in the page. These open a confirmation dialog in the app, and only a real click by you approves it (a click made by a script, which is what an agent produces, is ignored):
    • the consequential tools;
    • clicks on any control that saves, activates, runs, approves or deploys (the builder's Save, Activate, Run and Execute step, run retry/pause/resume, approval decisions, environment promotions, settings Save);
    • clicks on buttons such as Delete, Remove, Cancel run or Sign out.
  • No delete tool. No tool deletes anything. A Delete button clicked with ui_click asks you first, like any consequential click.
  • Off-limits areas. Agents cannot:
    • manage credentials or connections;
    • open the vault, billing or roles;
    • read or fill password, payment or secret fields.
  • Untrusted text. Workflow names, run errors and on-screen text come from users, so tools mark them as content, never as instructions for the agent.
  • No tools in frames. The app registers no tools when it is embedded in another site. The read-only workflow embed is additionally served with Permissions-Policy: tools=(). The app itself sends Permissions-Policy: tools=(self).

Next steps​