Skip to main content
The declarative API explores how HTML workflows, especially forms, can become agent-readable tools while preserving browser validation and user review.
<form toolname="search_catalog" tooldescription="Search the product catalog">
  <label>
    Query
    <input name="query" required />
  </label>
  <button type="submit">Search</button>
</form>
The attribute names, schema synthesis rules, constraint mapping, submission behavior, and iframe model are still evolving. Use the official explainer and declarative draft as the current authorities. Do not treat this example as a stable compatibility contract. For production JavaScript integrations, use document.modelContext.registerTool().