Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions apps/docs/src/content/agents/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,27 @@ Two arguments come up in almost every tool:
| Tool | What it answers | Arguments |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| `inspect-forms` | Without arguments, each form with its status and error count, plus WebMCP tool state for Signal Forms that set `experimentalWebMcpTool`. With `form`, its field tree: value, status, touched, dirty and errors, and a `webMcp` entry with the tool name, inputs, registration status, blocking fields and recent calls. | `form`, `path`, `onlyInvalid`, `includeValues` |
| `explain-form-invalid` | Which fields make a form invalid, and why: the failing validator, its message, the value and whether it was touched. Without `form`, every invalid or pending form. | `form` |
| `explain-form-invalid` | Which fields make a form invalid, and why: the failing validator, its message, the value and whether it was touched. Without `form`, every invalid or pending form. | `form`, `path` |
| `explain-field` | One field: where each error comes from, why validation is skipped, the binding and DOM facts like the label and visible error text. | `form`, `path`, or `selector` (a CSS selector) |
| `explain-submit` | What submit does, and why it might do nothing. | `form` |
| `form-payload` | What the form sends: `value` against `getRawValue()`, fields that are sent without validation, and which fields the user changed. | `form` |
| `form-payload` | What the form sends: `value` against `getRawValue()`, fields that are sent without validation, and which fields the user changed. | `form`, `path` |
| `explain-custom-control` | How a field is bound to its element, and what is wrong with the binding, such as value drift or a missing `setDisabledState`. | `form`, `path` |

For "why is this form invalid", call `explain-form-invalid` first. The tools redact passwords and other secret-looking values.

Answers about large forms are cut to keep an agent's context small. Each cut ends with a note on what was left out and how to narrow the answer:

| Tool | Cap | Narrow with |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `inspect-forms` | As many fields per form as fit in 20,000 characters, at most 200, taken level by level from the start of the tree. A group that lost fields carries `notShown` with the count. Values, error messages and metadata over 300 characters are cut. If not even one field fits, each form shows only its status and `notShown`. | `path`, `form` or `onlyInvalid` |
| `explain-form-invalid` | 100 problems per form, then `… and N more not shown`. | `path` |
| `form-payload` | 8,000 characters per value. | `path` |
| `export-form` | The same field cap as `inspect-forms` for a snapshot. A fixture, header included, fits in 20,000 characters, and its header lists at most 20 failing fields. | `inspect-forms` or `form-payload` with `path` |
| `lint-forms` | 100 findings. | `form` |
| `form-diff` | 100 changed fields. | `form` or a later `since` marker |

With `path`, `inspect-forms`, `explain-form-invalid` and `form-payload` start at that group or field, so a cut part of the form can be read one group at a time.

### Track changes

| Tool | What it answers | Arguments |
Expand Down
30 changes: 17 additions & 13 deletions apps/docs/src/content/inspectors/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,19 @@ You can also open a form from its component in the [Components tab](./components

### Read tools

| Tool | What it does |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `pangular:explain-form-invalid` | Start here. Every invalid or pending form, with each failing field's value, validator, message and touched state. |
| `pangular:inspect-forms` | The forms with status and error counts, and WebMCP tool state. With `form`, the field tree. Narrow with `path` or `onlyInvalid`. |
| `pangular:explain-field` | One field: error sources, skip reasons, pending values, binding, visible errors, and source lines. |
| `pangular:explain-submit` | What submit does, and why it might do nothing. |
| `pangular:form-payload` | What the form sends: value against raw value, and unvalidated fields. |
| `pangular:form-history` | The change timeline with origins. Returns a marker. |
| `pangular:form-diff` | The net change since a marker. |
| `pangular:lint-forms` | Form bugs and accessibility checks. |
| `pangular:explain-custom-control` | How a field binds to its element, and what is wrong with the binding. |
| `pangular:export-form` | A JSON snapshot or a test fixture. |
| `pangular:wait-for-form` | Waits until the form is settled, valid, not pending or submitted. |
| Tool | What it does |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `pangular:explain-form-invalid` | Start here. Every invalid or pending form, with each failing field's value, validator, message and touched state. Narrow with `path`. |
| `pangular:inspect-forms` | The forms with status and error counts, and WebMCP tool state. With `form`, the field tree. Narrow with `path` or `onlyInvalid`. |
| `pangular:explain-field` | One field: error sources, skip reasons, pending values, binding, visible errors, and source lines. |
| `pangular:explain-submit` | What submit does, and why it might do nothing. |
| `pangular:form-payload` | What the form sends: value against raw value, and unvalidated fields. Narrow with `path`. |
| `pangular:form-history` | The change timeline with origins. Returns a marker. |
| `pangular:form-diff` | The net change since a marker. |
| `pangular:lint-forms` | Form bugs and accessibility checks. |
| `pangular:explain-custom-control` | How a field binds to its element, and what is wrong with the binding. |
| `pangular:export-form` | A JSON snapshot or a test fixture. |
| `pangular:wait-for-form` | Waits until the form is settled, valid, not pending or submitted. |

### Write tools

Expand Down Expand Up @@ -240,6 +240,10 @@ Without a browser that provides `modelContext`, Angular registers no tool. The [

If you load `/examples/forms` directly, the form registers before the overlay loads. The block then says **registered before the inspector attached**, and the call is not recorded. In a browser with its own `modelContext`, the demo uses it, and **Fill as an agent** asks you to call `sign_up` from your agent.

### Large forms in agent answers

The agent tools cut answers about large forms, so one form cannot fill an agent's context. A cut answer says how many fields or lines it left out and how to narrow the answer, for example with `path`, `form` or a later `since` marker. See [Tools](../agents/tools.md#read-form-state) for each limit.

### Snapshot limits

The page keeps up to 20 snapshots, and a reload clears them. Restore fails when the form's shape has changed, and it keeps the current value of secret fields.
Expand Down
Loading
Loading