Angular 22 · experimental ·
Angular 22: turn a Signal Form into a tool for AI agents
Angular 22's experimental WebMCP support can expose a Signal Form as a tool an AI agent calls. How the schema is inferred, what still runs, and the caveats.
WebMCP is a proposed web standard that lets a page expose tools, typed functions an AI agent can call, so the agent does not have to click through the UI. Angular 22 has experimental support for it, and the most useful part is that a Signal Form can become such a tool with one option.
Turning a form into a tool
Enable form tools with provideExperimentalWebMcpForms(), then pass experimentalWebMcpTool with a name and a description in the options, the third argument of form(), next to submission:
// app config
providers: [provideExperimentalWebMcpForms()],
// in the component
readonly registration = form(this.user, schema, {
experimentalWebMcpTool: {
name: 'registerUser',
description: 'Registers a new user.',
},
// submission as usual
});What Angular infers
Angular infers the tool schema from the initial value of the form model, so give every field a concrete starting value; it cannot infer a type from null or undefined. Fields with a required validator become required in the schema, and an array of strings lets the agent send any number of items.
When an agent calls the tool, Angular connects it to the form's validation and submission. The agent sees the validation errors its input triggers and any failure from submission, so it can correct itself and retry. Async validators are not triggered; the docs say to handle those in the submission action.
Caveats
Both layers are early. Angular's WebMCP support is experimental and may change outside major versions, and the WebMCP spec itself changes often. The docs also say Angular does not check that an agent's input matches the schema, so validate arguments before you rely on them. I would try it on a low-risk form, like a newsletter signup, before anything that writes important data.
Sources
I post short notes like this on LinkedIn.
Need help with this?
