Same form, three levels of AI integration. Each tab builds on the last by adding a single attribute.
The agent fills in the form fields, but the user must review and click
Search to submit. Only toolname and
tooldescription are required.
Adding toolautosubmit lets the agent fill and submit
the form automatically, no manual click required.
With a submit event listener you can intercept agent
submissions, run your own logic, and return a custom value to the
agent via event.respondWith().
Define a form tool, describe its inputs, and control submission.
Attributes on <form>.
toolnametooldescriptiontooltitletoolname for invocation.
toolparamdescription<input>, <select>, and <textarea>.
toolautosubmitevent.agentInvokedtrue even when the user submits after manual review. false for submissions outside a tool invocation.
event.respondWith(promise)preventDefault() first, then pass a Promise resolving to the return value. Requires event.agentInvoked to be true.
Submission rule: Canceling an agent-invoked submission with preventDefault() without calling respondWith() rejects the tool invocation.