Turning Signal Forms into AI Agent Tools

Angular can auto-expose a Signal Form as a tool an AI agent fills and submits, with the form's own validation guarding the call so the agent self-corrects instead of submitting garbage. It is part of WebMCP, which is experimental, so the API can shift between minors. The primary source is next.angular.dev/ai/webmcp.

What you actually get

This is the most demo-friendly slice of WebMCP in Angular: instead of hand-writing a tool with a JSON schema and an execute callback, you let an existing Signal Form become the tool. Add provideExperimentalWebMcpForms() from @angular/forms/signals to your providers, pass an experimentalWebMcpTool option to form(), and Angular wires the rest.

The neat part is what the form already carries. Angular infers the tool's JSON schema from the form model's initial values, and it hooks the form's validation and submission into the call. So when an agent fills the tool, the validators you already wrote run; the agent sees the field errors and can correct itself, instead of pushing a half-valid payload at your submit handler. The same required rules that protect a human typing into the form now protect the agent calling it.

I read that as the form becoming a contract the agent has to satisfy, not a surface it pokes at. You write the form once, for people, and the agent gets the validated version for free.

A Signal Form exposed as a toolts
// provideExperimentalWebMcpForms() must be in your providers
readonly model = signal({ firstName: '', lastName: '' });

readonly userForm = form(this.model,
  (f) => {
    required(f.firstName, { message: 'First name is mandatory.' });
    required(f.lastName, { message: 'Last name is mandatory.' });
  },
  {
    experimentalWebMcpTool: { name: 'registerUser', description: 'Registers a new user.' },
    submission: { action: async (formValue) => { /* ... */ } },
  },
);

What the schema inference needs

The convenience has a price, and it is in the model. Angular reads the shape of the tool's schema from the model's initial values, so the values have to be concrete enough to read a type from. There is no separate schema you can correct by hand; the model is the schema.

Three constraints follow from that. First, every field needs a concrete initial value ('', 0, false), never null or undefined, because a type cannot be inferred from null. Second, arrays need at least one element so the item shape is known. Third, async validators do not run during agent submission, so anything you only enforce asynchronously will not gate the agent.

Read the table as the cost of skipping a hand-written schema. If a field cannot give a clean initial value, that is the field you have to think about before exposing the form.

Model fieldInferred asGotcha
name: ''stringFine. An empty string still reads as a string.
age: 0numberFine, but 0 is a real default value, not 'unset'.
active: falsebooleanFine. false reads as boolean.
tags: []array of unknownNeeds at least one element so the item shape is known; an empty array hides it.
role: nullcannot inferNo type comes from null; give a concrete default like '' instead.

Where this earns its place, and where I would wait

I would reach for this on internal and admin forms that an agent drives: a back-office record an operator could fill by hand, or a batch action behind a flag, where the form already has good validation and the blast radius is small. There it is genuinely useful, and the validation gating the call is the feature, not a footnote.

I would wait on user-facing and regulated submissions. The forms half is settled now: Signal Forms are stable as of Angular 22. The agent half is not. WebMCP is experimental, a W3C Community Group draft, and the docs warn the APIs can change outside major versions. The deeper reason is that Angular does not validate that an agent's inputs match the inferred schema; you still validate inside submission for anything that matters. So it is one experimental layer now, not two: I would adopt Signal Forms on their own before trusting the agent layer on top in a revenue flow.

Reusable artifact

Form-as-tool readiness checklist

  • Give every model field a concrete initial value ('', 0, false), never null or undefined.
  • Seed every array with at least one element so Angular can infer the item shape.
  • Do not rely on async validators to gate the agent; they do not run during agent submission.
  • Validate inputs inside the submission action for anything that matters; the inferred schema is not enforced.
  • Keep the first targets internal or admin forms an agent drives, behind a flag.
  • Treat the tool as experimental and re-check the API on every Angular minor, not just majors.

FAQ

How does a Signal Form become an AI agent tool?

Add provideExperimentalWebMcpForms() to your providers and pass an experimentalWebMcpTool option to form(). Angular infers the tool's JSON schema from the model's initial values and wires the form's validation and submission, so the agent sees field errors and self-corrects. Source: next.angular.dev/ai/webmcp.

Why can't a field be null in the model?

Angular infers the schema from the model's initial values, and a type cannot be inferred from null or undefined. Give each field a concrete default like '', 0, or false instead, and seed arrays with at least one element so the item shape is known.

Does the form's validation protect the agent's call?

Synchronous validation does. The agent sees the same field errors a human would and can correct itself before submitting. Async validators do not run during agent submission, and Angular does not enforce the inferred schema, so validate inputs inside the submission action for anything that matters.

Is this safe to ship to users?

I would wait, though for a narrower reason than before. Signal Forms are stable in Angular 22, so the forms half is settled; WebMCP is the part that is still experimental, with docs warning the APIs can change outside major versions. I would use it on internal or admin forms behind a flag and keep it out of user-facing or regulated submissions for now.

Sources checked

Modern Angular Playbook

This article is one play.

The Modern Angular Playbook collects the diagnostic, the adoption matrix, eleven plays, and the 30-day plan. Free, in English and Portuguese.

You get both PDFs by email, through the Dojo IA list.

Open playbook →

André Ramosavailable for remote roles, UTC−3Get in touch →

Related

Note · 6 min

WebMCP vs the Angular CLI MCP Server: Runtime Tools vs Dev-Time Help

Which Angular MCP you actually want: the dev-time CLI MCP server that helps an assistant write your code, or runtime WebMCP that lets a browser agent call your shipped app.

Read article →

Guide · 12 min

WebMCP in Angular: How to Expose Tools to the Browser's AI Agent (and When to Wait)

How Angular exposes WebMCP tools to a browser AI agent (bootstrap, routes, services, and Signal Forms), plus the security surface that opens and where I would still wait before shipping.

Read article →

Guide · 8 min

WebMCP Security in Angular: The Agent Calling Your Tools Can Be Hijacked

A security guide for Angular's WebMCP: why an exposed tool acts with the user's authority, why the JSON schema is not a trust boundary, and the defenses before you expose anything that mutates.

Read article →